From: Mark Michelson Date: Fri, 13 Feb 2009 19:49:38 +0000 (+0000) Subject: Merged revisions 175590 via svnmerge from X-Git-Tag: 1.6.2.0-beta1~233 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=10281bf183358faef1a53377ddb5dc8a6facd3d2;p=thirdparty%2Fasterisk.git Merged revisions 175590 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r175590 | mmichelson | 2009-02-13 13:47:48 -0600 (Fri, 13 Feb 2009) | 16 lines 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: https://origsvn.digium.com/svn/asterisk/trunk@175591 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 6c84865b87..257ebae2b1 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -8894,7 +8894,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