diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-21 17:45:56 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-21 17:45:56 +0000 |
commit | 434351dcc204323e7e60eacb8a3dd013cf6b6dc1 (patch) | |
tree | ba4f7e5886c451ca25da4d580e374725b20f4ef8 | |
parent | 8b636e381211c9c5c992f6facd78d35465d6963d (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
-rw-r--r-- | funcs/func_strings.c | 5 |
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++; |