aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-12-15 15:35:41 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-12-15 15:35:41 +0000
commitb2b6244c7d74ebb797be1b781209217238c1e6c9 (patch)
tree45fab12d0e147d32309e11c343b73f7168617593 /res
parentda20f325a126537c4474fe3b5ed32e906ce2de24 (diff)
Merged revisions 235053 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r235053 | tilghman | 2009-12-15 09:33:49 -0600 (Tue, 15 Dec 2009) | 11 lines 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 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@235055 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_agi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/res/res_agi.c b/res/res_agi.c
index be2794a63..d953a9d2f 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -1721,6 +1721,9 @@ static int handle_noop(struct ast_channel *chan, AGI *agi, int arg, char *argv[]
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))