[asterisk-commits] tilghman: trunk r235053 - in /trunk: ./ res/res_agi.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Dec 15 09:33:51 CST 2009


Author: tilghman
Date: Tue Dec 15 09:33:49 2009
New Revision: 235053

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=235053
Log:
Merged revisions 235052 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r235052 | tilghman | 2009-12-15 09:29:24 -0600 (Tue, 15 Dec 2009) | 4 lines
  
  Mandatory argument checking
  (closes issue #16446)
   Reported by: nicchap
........

Modified:
    trunk/   (props changed)
    trunk/res/res_agi.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/res/res_agi.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_agi.c?view=diff&rev=235053&r1=235052&r2=235053
==============================================================================
--- trunk/res/res_agi.c (original)
+++ trunk/res/res_agi.c Tue Dec 15 09:33:49 2009
@@ -2553,6 +2553,9 @@
 
 static int handle_setmusic(struct ast_channel *chan, AGI *agi, int argc, const char * const argv[])
 {
+	if (argc < 3) {
+		return RESULT_SHOWUSAGE;
+	}
 	if (!strncasecmp(argv[2], "on", 2))
 		ast_moh_start(chan, argc > 3 ? argv[3] : NULL, NULL);
 	else if (!strncasecmp(argv[2], "off", 3))




More information about the asterisk-commits mailing list