dovecot-2.2: layout=index: Fixed a crash in mailbox_rename() rac...

dovecot at dovecot.org dovecot at dovecot.org
Mon Oct 29 20:42:10 EET 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/9050920ce827
changeset: 15348:9050920ce827
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Oct 29 20:42:00 2012 +0200
description:
layout=index: Fixed a crash in mailbox_rename() race condition.

diffstat:

 src/lib-storage/list/mailbox-list-index-backend.c |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r bab7bbc0c153 -r 9050920ce827 src/lib-storage/list/mailbox-list-index-backend.c
--- a/src/lib-storage/list/mailbox-list-index-backend.c	Mon Oct 29 20:34:31 2012 +0200
+++ b/src/lib-storage/list/mailbox-list-index-backend.c	Mon Oct 29 20:42:00 2012 +0200
@@ -483,6 +483,12 @@
 		(void)mailbox_list_index_sync_end(&sync_ctx, FALSE);
 		return -1;
 	}
+	if (ret == 0) {
+		(void)mailbox_list_index_sync_end(&sync_ctx, FALSE);
+		mailbox_list_set_error(&list->list, MAIL_ERROR_NOTFOUND,
+			T_MAIL_ERR_MAILBOX_NOT_FOUND(oldname));
+		return -1;
+	}
 	if (!mail_index_lookup_seq(sync_ctx->view, oldnode->uid, &oldseq))
 		i_panic("mailbox list index: lost uid=%u", oldnode->uid);
 


More information about the dovecot-cvs mailing list