From 3718cbc956fd83d40fa955bbbd2306e5130f2023 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 19 May 2009 15:38:45 +0000 Subject: [PATCH] fixx off-by-one in xml preprocessor git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13385 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_xml.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/switch_xml.c b/src/switch_xml.c index bbb45277c8..3cc34c961a 100644 --- a/src/switch_xml.c +++ b/src/switch_xml.c @@ -1147,7 +1147,7 @@ static char *expand_vars(char *buf, char *ebuf, switch_size_t elen, switch_size_ while (*rp && wp < ep) { if (*rp == '$' && *(rp + 1) == '$' && *(rp + 2) == '{') { - char *e = strchr(rp, '}'); + char *e = switch_find_end_paren(rp + 2, '{', '}'); if (e) { rp += 3; @@ -1160,6 +1160,7 @@ static char *expand_vars(char *buf, char *ebuf, switch_size_t elen, switch_size_ *wp++ = *p; } } + continue; } }