dovecot-2.2: lib-index: Replaced assert-crash with "index corrup...

dovecot at dovecot.org dovecot at dovecot.org
Mon Aug 5 14:06:38 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/d6290bd28253
changeset: 16645:d6290bd28253
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Aug 05 14:06:23 2013 +0300
description:
lib-index: Replaced assert-crash with "index corrupted" error.

diffstat:

 src/lib-index/mail-index-sync-update.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (15 lines):

diff -r 374e338bb3d6 -r d6290bd28253 src/lib-index/mail-index-sync-update.c
--- a/src/lib-index/mail-index-sync-update.c	Mon Aug 05 13:46:37 2013 +0300
+++ b/src/lib-index/mail-index-sync-update.c	Mon Aug 05 14:06:23 2013 +0300
@@ -172,8 +172,10 @@
 	if (all) {
 		mail_index_sync_header_update_counts_all(ctx, uid, old_flags,
 							 new_flags);
+	} else if (uid >= ctx->view->map->hdr.next_uid) {
+		mail_index_sync_set_corrupted(ctx, "uid %u >= next_uid %u",
+					      uid, ctx->view->map->hdr.next_uid);
 	} else {
-		i_assert(uid < ctx->view->map->hdr.next_uid);
 		if (mail_index_header_update_counts(&ctx->view->map->hdr,
 						    old_flags, new_flags,
 						    &error) < 0)


More information about the dovecot-cvs mailing list