dovecot-2.0: lib-index: Another fix attempt for handling atomic ...

dovecot at dovecot.org dovecot at dovecot.org
Thu Apr 29 19:03:03 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/78742ad02c88
changeset: 11220:78742ad02c88
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Apr 29 19:02:59 2010 +0300
description:
lib-index: Another fix attempt for handling atomic inc with INT_MAX.

diffstat:

 src/lib-index/mail-index-sync-ext.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r a2d7c699abbb -r 78742ad02c88 src/lib-index/mail-index-sync-ext.c
--- a/src/lib-index/mail-index-sync-ext.c	Thu Apr 29 19:00:47 2010 +0300
+++ b/src/lib-index/mail-index-sync-ext.c	Thu Apr 29 19:02:59 2010 +0300
@@ -752,7 +752,7 @@
 			ext->record_size);
 		return -1;
 	}
-	if (u->diff < 0 && (uint64_t)(-u->diff) > orig_num) {
+	if (u->diff < 0 && (uint64_t)(-(int64_t)u->diff) > orig_num) {
 		mail_index_sync_set_corrupted(ctx,
 			"Extension record inc drops number below zero "
 			"(uid=%u, diff=%d, orig=%llu)",


More information about the dovecot-cvs mailing list