diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2009-12-15 15:33:49 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2009-12-15 15:33:49 +0000 |
commit | 2204f89a1dd9b2ad13a53d6fad207d1a246f9238 (patch) | |
tree | 44baeef21527379219c5da8a3442bd0684119d92 /res/res_agi.c | |
parent | df1fc1f381d02dcc65c922e7675f6e6ec455cb23 (diff) |
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: https://origsvn.digium.com/svn/asterisk/trunk@235053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_agi.c')
-rw-r--r-- | res/res_agi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/res/res_agi.c b/res/res_agi.c index e868601bd..0a468f443 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -2553,6 +2553,9 @@ static int handle_noop(struct ast_channel *chan, AGI *agi, int arg, const char * 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)) |