aboutsummaryrefslogtreecommitdiffstats
path: root/funcs
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-21 17:45:56 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-21 17:45:56 +0000
commit434351dcc204323e7e60eacb8a3dd013cf6b6dc1 (patch)
treeba4f7e5886c451ca25da4d580e374725b20f4ef8 /funcs
parent8b636e381211c9c5c992f6facd78d35465d6963d (diff)
fix REGEX on strings that contain quotes (issue #6678)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@13925 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs')
-rw-r--r--funcs/func_strings.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/funcs/func_strings.c b/funcs/func_strings.c
index 503611bbe..27c457dd4 100644
--- a/funcs/func_strings.c
+++ b/funcs/func_strings.c
@@ -89,10 +89,9 @@ static char *builtin_function_regex(struct ast_channel *chan, char *cmd, char *d
/* Regex in quotes */
arg = strchr(tmp, '"');
if (arg) {
- arg++;
- earg = strrchr(arg, '"');
+ earg = ++arg;
+ strsep(&earg, "\"");
if (earg) {
- *earg++ = '\0';
/* Skip over any spaces before the data we are checking */
while (*earg == ' ')
earg++;