diff options
author | Joshua Colp <jcolp@digium.com> | 2016-10-26 12:51:50 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2016-10-26 08:16:07 -0500 |
commit | ebc293e609cbbcad3b3e813bacfe7b04c961900f (patch) | |
tree | 795b1cd7d5fe18c5b21f1ddc4967e2fb5dc4444d /apps | |
parent | 7c3cc1b605b74bee37f9131c338ce3ca23505fd3 (diff) |
app_voicemail: Clear voice mailbox in MailboxExists and MAILBOX_EXISTS.
When executing the MailboxExists dialplan application and
MAILBOX_EXISTS dialplan function the passed in temporary voice
mailbox was not cleared, causing it to try to free garbage.
ASTERISK-26503 #close
Change-Id: Ie21ccfa1b80b9c59318e596f6b8e17da2b5a7cb3
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_voicemail.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 4727e2ee5..300dc186d 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -12529,6 +12529,7 @@ static int vm_box_exists(struct ast_channel *chan, const char *data) context++; } + memset(&svm, 0, sizeof(svm)); vmu = find_user(&svm, context, args.mbox); if (vmu) { pbx_builtin_setvar_helper(chan, "VMBOXEXISTSSTATUS", "SUCCESS"); @@ -12560,6 +12561,7 @@ static int acf_mailbox_exists(struct ast_channel *chan, const char *cmd, char *a ast_log(AST_LOG_WARNING, "MAILBOX_EXISTS is deprecated. Please use ${VM_INFO(%s,exists)} instead.\n", args); } + memset(&svm, 0, sizeof(svm)); vmu = find_user(&svm, ast_strlen_zero(arg.context) ? "default" : arg.context, arg.mbox); ast_copy_string(buf, vmu ? "1" : "0", len); free_user(vmu); |