dovecot-2.2: virtual plugin: Fixed crash on mailbox_status() if ...

dovecot at dovecot.org dovecot at dovecot.org
Mon Sep 28 13:18:53 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/1041fb241512
changeset: 19246:1041fb241512
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Sep 28 16:13:00 2015 +0300
description:
virtual plugin: Fixed crash on mailbox_status() if virtual mailbox wasn't opened yet.
mbox->backend_boxes is initialized only when mailbox is opened.

diffstat:

 src/plugins/virtual/virtual-storage.c |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r 687dd4db9373 -r 1041fb241512 src/plugins/virtual/virtual-storage.c
--- a/src/plugins/virtual/virtual-storage.c	Mon Sep 28 16:07:12 2015 +0300
+++ b/src/plugins/virtual/virtual-storage.c	Mon Sep 28 16:13:00 2015 +0300
@@ -508,6 +508,11 @@
 	struct mailbox_status status;
 	bool opened;
 
+	if (!mbox->box.opened) {
+		if (mailbox_open(&mbox->box) < 0)
+			return -1;
+	}
+
 	mbox->have_guids = TRUE;
 	mbox->have_save_guids = TRUE;
 


More information about the dovecot-cvs mailing list