mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-18 17:41:53 +00:00
fixx off-by-one in xml preprocessor
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13385 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
123d724377
commit
3718cbc956
@ -1147,7 +1147,7 @@ static char *expand_vars(char *buf, char *ebuf, switch_size_t elen, switch_size_
|
|||||||
while (*rp && wp < ep) {
|
while (*rp && wp < ep) {
|
||||||
|
|
||||||
if (*rp == '$' && *(rp + 1) == '$' && *(rp + 2) == '{') {
|
if (*rp == '$' && *(rp + 1) == '$' && *(rp + 2) == '{') {
|
||||||
char *e = strchr(rp, '}');
|
char *e = switch_find_end_paren(rp + 2, '{', '}');
|
||||||
|
|
||||||
if (e) {
|
if (e) {
|
||||||
rp += 3;
|
rp += 3;
|
||||||
@ -1160,6 +1160,7 @@ static char *expand_vars(char *buf, char *ebuf, switch_size_t elen, switch_size_
|
|||||||
*wp++ = *p;
|
*wp++ = *p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user