[svn-commits] tilghman: branch 1.6.0 r236187 - in /branches/1.6.0: ./ res/res_agi.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Dec 22 21:10:12 CST 2009


Author: tilghman
Date: Tue Dec 22 21:10:10 2009
New Revision: 236187

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=236187
Log:
Merged revisions 236186 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r236186 | tilghman | 2009-12-22 21:07:48 -0600 (Tue, 22 Dec 2009) | 11 lines
  
  Merged revisions 236184 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r236184 | tilghman | 2009-12-22 20:55:24 -0600 (Tue, 22 Dec 2009) | 4 lines
    
    If EXEC only gets a single argument, don't crash when the second is used.
    (closes issue #16504)
     Reported by: bklang
  ........
................

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/res/res_agi.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/res/res_agi.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.0/res/res_agi.c?view=diff&rev=236187&r1=236186&r2=236187
==============================================================================
--- branches/1.6.0/res/res_agi.c (original)
+++ branches/1.6.0/res/res_agi.c Tue Dec 22 21:10:10 2009
@@ -1496,7 +1496,7 @@
 	if ((app = pbx_findapp(argv[1]))) {
 		if (ast_compat_res_agi && !ast_strlen_zero(argv[2])) {
 			char *compat = alloca(strlen(argv[2]) * 2 + 1), *cptr, *vptr;
-			for (cptr = compat, vptr = argv[2]; *vptr; vptr++) {
+			for (cptr = compat, vptr = (argc == 2) ? "" : argv[2]; *vptr; vptr++) {
 				if (*vptr == ',') {
 					*cptr++ = '\\';
 					*cptr++ = ',';
@@ -1509,7 +1509,7 @@
 			*cptr = '\0';
 			res = pbx_exec(chan, app, compat);
 		} else {
-			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]);




More information about the svn-commits mailing list