[asterisk-commits] tilghman: branch 1.4 r235052 - /branches/1.4/res/res_agi.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Dec 15 09:29:27 CST 2009
Author: tilghman
Date: Tue Dec 15 09:29:24 2009
New Revision: 235052
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=235052
Log:
Mandatory argument checking
(closes issue #16446)
Reported by: nicchap
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=235052&r1=235051&r2=235052
==============================================================================
--- branches/1.4/res/res_agi.c (original)
+++ branches/1.4/res/res_agi.c Tue Dec 15 09:29:24 2009
@@ -1399,6 +1399,9 @@
static int handle_setmusic(struct ast_channel *chan, AGI *agi, int argc, char *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