Module: kamailio
Branch: 5.4
Commit: c8d42b328302e18c7b915b3760c5089910a1ad49
URL:
https://github.com/kamailio/kamailio/commit/c8d42b328302e18c7b915b3760c5089…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-10-27T09:53:40+01:00
xcap_server: shorten a bit the search range for xcaps_xpath_hack()
- match on the buffer len min size, xmlns is expected to have a value,
plus the ending of the xml tag
(cherry picked from commit 3be41802c7c670cce0d3e08462e23ca3f3fbe2d4)
---
Modified: src/modules/xcap_server/xcap_server.c
---
Diff:
https://github.com/kamailio/kamailio/commit/c8d42b328302e18c7b915b3760c5089…
Patch:
https://github.com/kamailio/kamailio/commit/c8d42b328302e18c7b915b3760c5089…
---
diff --git a/src/modules/xcap_server/xcap_server.c
b/src/modules/xcap_server/xcap_server.c
index 1556aa14b9..5c1ca9004b 100644
--- a/src/modules/xcap_server/xcap_server.c
+++ b/src/modules/xcap_server/xcap_server.c
@@ -322,7 +322,7 @@ int xcaps_xpath_hack(str *buf, int type)
start = buf->s;
STR_VTOZ(buf->s[buf->len-1], c);
- while((start < buf->s + buf->len - 8) && (p = strstr(start,
match))!=NULL) {
+ while((start < buf->s + buf->len - 10) && (p = strstr(start,
match))!=NULL) {
memcpy(p, repl, 7);
start = p + 7;
}