aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_voicemail.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-02-01 02:44:23 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-02-01 02:44:23 +0000
commitc1bad1277ff0b0973ccf41302b563dfefa3af7ab (patch)
tree588e4494ffed0d00b0540a96a2c576eb68aa1322 /apps/app_voicemail.c
parent1846b2ef9da3f704fc57a098acc3781760b5b1cd (diff)
Blank argument crashes Asterisk
(closes issue #14377) Reported by: amorsen git-svn-id: http://svn.digium.com/svn/asterisk/trunk@172741 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r--apps/app_voicemail.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index bb1366bad..61a1521a2 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -9627,6 +9627,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;
}