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/branches/1.4@154066 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2008-11-03 22:27:10 +00:00
parent 9f7707dae8
commit 799fe53401
+1 -1
View File
@@ -7740,7 +7740,7 @@ out:
/* expunge message - use UID Expunge if supported on IMAP server*/
if (option_debug > 2)
ast_log(LOG_DEBUG, "*** 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);