[svn-commits] branch 1.2 - r7557 /branches/1.2/res/res_agi.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Tue Dec 20 14:21:28 CST 2005


Author: russell
Date: Tue Dec 20 14:21:26 2005
New Revision: 7557

URL: http://svn.digium.com/view/asterisk?rev=7557&view=rev
Log:
check array bounds when parsing arguments to AGI (issue #5868)

Modified:
    branches/1.2/res/res_agi.c

Modified: branches/1.2/res/res_agi.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/res/res_agi.c?rev=7557&r1=7556&r2=7557&view=diff
==============================================================================
--- branches/1.2/res/res_agi.c (original)
+++ branches/1.2/res/res_agi.c Tue Dec 20 14:21:26 2005
@@ -2016,9 +2016,8 @@
 	ast_copy_string(buf, data, sizeof(buf));
 
 	memset(&agi, 0, sizeof(agi));
-        while ((stringp = strsep(&tmp, "|"))) {
+        while ((stringp = strsep(&tmp, "|")) && argc < MAX_ARGS - 1)
 		argv[argc++] = stringp;
-        }
 	argv[argc] = NULL;
 
 	LOCAL_USER_ADD(u);



More information about the svn-commits mailing list