mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-03 03:02:15 +00:00
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
This commit is contained in:
@@ -12450,6 +12450,7 @@ static int vm_box_exists(struct ast_channel *chan, const char *data)
|
|||||||
context++;
|
context++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
memset(&svm, 0, sizeof(svm));
|
||||||
vmu = find_user(&svm, context, args.mbox);
|
vmu = find_user(&svm, context, args.mbox);
|
||||||
if (vmu) {
|
if (vmu) {
|
||||||
pbx_builtin_setvar_helper(chan, "VMBOXEXISTSSTATUS", "SUCCESS");
|
pbx_builtin_setvar_helper(chan, "VMBOXEXISTSSTATUS", "SUCCESS");
|
||||||
@@ -12481,6 +12482,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);
|
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);
|
vmu = find_user(&svm, ast_strlen_zero(arg.context) ? "default" : arg.context, arg.mbox);
|
||||||
ast_copy_string(buf, vmu ? "1" : "0", len);
|
ast_copy_string(buf, vmu ? "1" : "0", len);
|
||||||
free_user(vmu);
|
free_user(vmu);
|
||||||
|
Reference in New Issue
Block a user