[asterisk-commits] tilghman: branch 1.4 r236184 - /branches/1.4/res/res_agi.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Dec 22 20:55:26 CST 2009


Author: tilghman
Date: Tue Dec 22 20:55:24 2009
New Revision: 236184

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=236184
Log:
If EXEC only gets a single argument, don't crash when the second is used.
(closes issue #16504)
 Reported by: bklang

Modified:
    branches/1.4/res/res_agi.c

Modified: branches/1.4/res/res_agi.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/res/res_agi.c?view=diff&rev=236184&r1=236183&r2=236184
==============================================================================
--- branches/1.4/res/res_agi.c (original)
+++ branches/1.4/res/res_agi.c Tue Dec 22 20:55:24 2009
@@ -1140,7 +1140,7 @@
 		if(!strcasecmp(argv[1], PARK_APP_NAME)) {
 			ast_masq_park_call(chan, NULL, 0, NULL);
 		}
-		res = pbx_exec(chan, app, argv[2]);
+		res = pbx_exec(chan, app, argc == 2 ? "" : argv[2]);
 	} else {
 		ast_log(LOG_WARNING, "Could not find application (%s)\n", argv[1]);
 		res = -2;




More information about the asterisk-commits mailing list