diff options
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 fe53ebe68..665ccb1f5 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -1399,6 +1399,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)) |