diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-17 20:56:15 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-17 20:56:15 +0000 |
commit | d9a9a933ddc3318923a4c3029b5d6f22c25ca594 (patch) | |
tree | 266b65aaf0fc3aa794174e1bc9d6dc76525755f4 | |
parent | f09065fd9329cccaa53de522b5d6a9203e427a2d (diff) |
Merged revisions 51194 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r51194 | tilghman | 2007-01-17 14:52:21 -0600 (Wed, 17 Jan 2007) | 4 lines
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.4@51195 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | main/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/utils.c b/main/utils.c index 88bd23c19..6d732534b 100644 --- a/main/utils.c +++ b/main/utils.c @@ -638,7 +638,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++; |