diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-12-15 15:33:49 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-12-15 15:33:49 +0000 |
commit | 0c6271843083060ccfe340a842596b6ebc46fe51 (patch) | |
tree | 44baeef21527379219c5da8a3442bd0684119d92 /res | |
parent | c495daa3ce20d24fb93aed05b5d678533c22d7a2 (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: http://svn.digium.com/svn/asterisk/trunk@235053 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-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)) |