Blame SOURCES/dovecot-2.2.10-b8864211b88ed7521e9af514590639344af38910.patch

386c00
From b8864211b88ed7521e9af514590639344af38910 Mon Sep 17 00:00:00 2001
386c00
From: Timo Sirainen <tss@iki.fi>
386c00
Date: Wed, 28 May 2014 18:17:52 +0300
386c00
Subject: [PATCH] lib-index: Fixed somewhat random assert-crashes during
386c00
 extension resizes.
386c00
386c00
---
386c00
 src/lib-index/mail-index-transaction-export.c | 6 +++---
386c00
 1 file changed, 3 insertions(+), 3 deletions(-)
386c00
386c00
diff --git a/src/lib-index/mail-index-transaction-export.c b/src/lib-index/mail-index-transaction-export.c
386c00
index a698674..2ad8565 100644
386c00
--- a/src/lib-index/mail-index-transaction-export.c
386c00
+++ b/src/lib-index/mail-index-transaction-export.c
386c00
@@ -114,10 +114,10 @@ static void log_append_ext_intro(struct mail_index_export_context *ctx,
386c00
 		/* we're resizing the extension. use the resize struct. */
386c00
 		intro = &resizes[ext_id];
386c00
 
386c00
-		i_assert(intro->ext_id == idx || idx == (uint32_t)-1);
386c00
-		if (idx != (uint32_t)-1)
386c00
+		if (idx != (uint32_t)-1) {
386c00
+			intro->ext_id = idx;
386c00
 			intro->name_size = 0;
386c00
-		else {
386c00
+		} else {
386c00
 			intro->ext_id = (uint32_t)-1;
386c00
 			intro->name_size = strlen(rext->name);
386c00
 		}