From: Tilghman Lesher Date: Mon, 3 Nov 2008 22:28:12 +0000 (+0000) Subject: Merged revisions 154066 via svnmerge from X-Git-Tag: 1.6.2.0-beta1~960 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b287a63971d6d5b1dc9819331b7694efbcb3a9cd;p=thirdparty%2Fasterisk.git Merged revisions 154066 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r154066 | tilghman | 2008-11-03 16:27:10 -0600 (Mon, 03 Nov 2008) | 5 lines Attempting to expunge a mailbox when the mailstream is NULL will crash Asterisk. (Closes issue #13829) Reported by: jaroth Patch by: me (modified jaroth's patch) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@154072 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index de08d99b32..d01ce3dcd4 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -9296,7 +9296,7 @@ out: #ifdef IMAP_STORAGE /* expunge message - use UID Expunge if supported on IMAP server*/ ast_debug(3, "*** Checking if we can expunge, deleted set to %d, expungeonhangup set to %d\n",deleted,expungeonhangup); - if (vmu && deleted == 1 && expungeonhangup == 1) { + if (vmu && deleted == 1 && expungeonhangup == 1 && vms.mailstream != NULL) { #ifdef HAVE_IMAP_TK2006 if (LEVELUIDPLUS (vms.mailstream)) { mail_expunge_full(vms.mailstream,NIL,EX_UID);