Skip to content

Commit

Permalink
xcap_server: shorten a bit the search range for xcaps_xpath_hack()
Browse files Browse the repository at this point in the history
- 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 3be4180)
  • Loading branch information
miconda committed Oct 27, 2020
1 parent b51ea9f commit c8d42b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/xcap_server/xcap_server.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit c8d42b3

Please sign in to comment.