dovecot-2.2: imapc: Fixed potential crash when trying to send NO...

dovecot at dovecot.org dovecot at dovecot.org
Wed Sep 24 21:44:06 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/47ffe55be1ed
changeset: 17831:47ffe55be1ed
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Sep 25 00:41:15 2014 +0300
description:
imapc: Fixed potential crash when trying to send NOOP before mailbox was fully opened.

diffstat:

 src/lib-storage/index/imapc/imapc-storage.c |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r d467f4c20abb -r 47ffe55be1ed src/lib-storage/index/imapc/imapc-storage.c
--- a/src/lib-storage/index/imapc/imapc-storage.c	Thu Sep 25 00:40:48 2014 +0300
+++ b/src/lib-storage/index/imapc/imapc-storage.c	Thu Sep 25 00:41:15 2014 +0300
@@ -150,6 +150,11 @@
 	struct imapc_command *cmd;
 	struct imapc_simple_context sctx;
 
+	if (mbox->client_box == NULL) {
+		/* mailbox opening hasn't finished yet */
+		return;
+	}
+
 	imapc_simple_context_init(&sctx, mbox->storage->client);
 	cmd = imapc_client_mailbox_cmd(mbox->client_box,
 				       imapc_simple_callback, &sctx);


More information about the dovecot-cvs mailing list