aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-17 20:52:21 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-17 20:52:21 +0000
commit031a387956ef09d406f5e0a016df4e6ff2b6fd29 (patch)
tree9b4e323560cda660cff6ece9a888c9cf341da756
parent57f58d4fbe03ff298f115700d54eb3204a2808ac (diff)
When ast_strip_quoted was called with a zero-length string, it would treat a
NULL as if it were the quoting character (and would thus return the string in memory immediately following the passed-in string). git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@51194 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils.c b/utils.c
index e712ebe66..6b3680b8f 100644
--- a/utils.c
+++ b/utils.c
@@ -520,7 +520,7 @@ char *ast_strip_quoted(char *s, const char *beg_quotes, const char *end_quotes)
char *q;
s = ast_strip(s);
- if ((q = strchr(beg_quotes, *s))) {
+ if ((q = strchr(beg_quotes, *s)) && *q != '\0') {
e = s + strlen(s) - 1;
if (*e == *(end_quotes + (q - beg_quotes))) {
s++;