aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_voicemail.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-02-13 19:47:48 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-02-13 19:47:48 +0000
commitb7296b4b7700ed501a4d722da3a9d20971193ac9 (patch)
tree698eacc49b5cc8f04b66b43a70799eacbe90c0c2 /apps/app_voicemail.c
parent4a309d353abd9f6d1a359d4882ad24e1916d4ed1 (diff)
Fix a potential crash situation when using IMAP voicemail
If calling into VoiceMailMain when using IMAP storage, it was possible to crash Asterisk by hanging up the phone when prompted for a voicemail mailbox. This patch fixes the issue. While it may appear that this patch is superficial, it allows code execution to continue to the failure case just below the IMAP_STORAGE code block where this patch has been applied (closes issue #14473) Reported by: dwpaul Patches: voicemail_imap_crash_no_mailbox.patch uploaded by dwpaul (license 689) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@175590 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r--apps/app_voicemail.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 6a4677aa9..3566e71f4 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -7326,7 +7326,8 @@ static int vm_execmain(struct ast_channel *chan, void *data)
#ifdef IMAP_STORAGE
vms.interactive = 1;
vms.updated = 1;
- ast_copy_string(vms.context, vmu->context, sizeof(vms.context));
+ if (vmu)
+ ast_copy_string(vms.context, vmu->context, sizeof(vms.context));
vmstate_insert(&vms);
init_vm_state(&vms);
#endif