[asterisk-commits] tilghman: branch 1.2 r51194 - /branches/1.2/utils.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Jan 17 13:52:22 MST 2007


Author: tilghman
Date: Wed Jan 17 14:52:21 2007
New Revision: 51194

URL: http://svn.digium.com/view/asterisk?view=rev&rev=51194
Log:
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).

Modified:
    branches/1.2/utils.c

Modified: branches/1.2/utils.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/utils.c?view=diff&rev=51194&r1=51193&r2=51194
==============================================================================
--- branches/1.2/utils.c (original)
+++ branches/1.2/utils.c Wed Jan 17 14:52:21 2007
@@ -520,7 +520,7 @@
 	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++;



More information about the asterisk-commits mailing list