[asterisk-commits] rmudgett: branch rmudgett/cid r266287 - /team/rmudgett/cid/funcs/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri May 28 12:06:36 CDT 2010


Author: rmudgett
Date: Fri May 28 12:06:35 2010
New Revision: 266287

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=266287
Log:
Tighter checking of REDIRECTING() read parameters.

Modified:
    team/rmudgett/cid/funcs/func_redirecting.c

Modified: team/rmudgett/cid/funcs/func_redirecting.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/cid/funcs/func_redirecting.c?view=diff&rev=266287&r1=266286&r2=266287
==============================================================================
--- team/rmudgett/cid/funcs/func_redirecting.c (original)
+++ team/rmudgett/cid/funcs/func_redirecting.c Fri May 28 12:06:35 2010
@@ -407,7 +407,7 @@
 			ast_log(LOG_ERROR, "Unknown redirecting data type '%s'.\n", data);
 			break;
 		}
-	} else if (!strncasecmp("pres", member.argv[0], 4)) {
+	} else if (member.argc == 1 && !strncasecmp("pres", member.argv[0], 4)) {
 		/*
 		 * Accept pres[entation]
 		 * This is the combined from name/number presentation.
@@ -415,9 +415,9 @@
 		ast_copy_string(buf,
 			ast_named_caller_presentation(
 				ast_party_id_presentation(&chan->redirecting.from)), len);
-	} else if (!strcasecmp("reason", member.argv[0])) {
+	} else if (member.argc == 1 && !strcasecmp("reason", member.argv[0])) {
 		ast_copy_string(buf, ast_redirecting_reason_name(chan->redirecting.reason), len);
-	} else if (!strcasecmp("count", member.argv[0])) {
+	} else if (member.argc == 1 && !strcasecmp("count", member.argv[0])) {
 		snprintf(buf, len, "%d", chan->redirecting.count);
 	} else {
 		ast_log(LOG_ERROR, "Unknown redirecting data type '%s'.\n", data);




More information about the asterisk-commits mailing list