diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-02-01 02:45:05 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-02-01 02:45:05 +0000 |
commit | c53eba1eb0577e4664cc1c909fd7b03c1a07ce04 (patch) | |
tree | 9ab67a71efb297ffe2a29b30f761823dafda6f6c | |
parent | b8df3f371bb73d0db832c2b1c1fc705df0495bce (diff) |
Merged revisions 172741 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r172741 | tilghman | 2009-01-31 20:44:23 -0600 (Sat, 31 Jan 2009) | 4 lines
Blank argument crashes Asterisk
(closes issue #14377)
Reported by: amorsen
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@172742 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | apps/app_voicemail.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index b302e01c1..f0f97b6d7 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -8367,6 +8367,11 @@ static int acf_mailbox_exists(struct ast_channel *chan, const char *cmd, char *a AST_NONSTANDARD_APP_ARGS(arg, args, '@'); + if (ast_strlen_zero(arg.mbox)) { + ast_log(LOG_ERROR, "MAILBOX_EXISTS requires an argument (<mailbox>[@<context>])\n"); + return -1; + } + ast_copy_string(buf, find_user(&svm, ast_strlen_zero(arg.context) ? "default" : arg.context, arg.mbox) ? "1" : "0", len); return 0; } |