dovecot-2.0: mdbox: Don't assert-cras if refcount in map file is...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Mar 2 16:12:47 EET 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/9930d93bbd11
changeset: 10827:9930d93bbd11
user: Timo Sirainen <tss at iki.fi>
date: Tue Mar 02 15:42:50 2010 +0200
description:
mdbox: Don't assert-cras if refcount in map file is too low.
diffstat:
src/lib-storage/index/dbox-multi/mdbox-map.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diffs (16 lines):
diff -r 893abe2f65e0 -r 9930d93bbd11 src/lib-storage/index/dbox-multi/mdbox-map.c
--- a/src/lib-storage/index/dbox-multi/mdbox-map.c Tue Mar 02 13:21:26 2010 +0200
+++ b/src/lib-storage/index/dbox-multi/mdbox-map.c Tue Mar 02 15:42:50 2010 +0200
@@ -427,7 +427,11 @@
ctx->changed = TRUE;
cur_diff += mail_index_atomic_inc_ext(ctx->trans, seq,
map->ref_ext_id, diff);
- i_assert(cur_diff >= 0);
+ if (cur_diff < 0) {
+ dbox_map_set_corrupted(map,
+ "map_uid=%u refcount too low", *uidp);
+ return -1;
+ }
if (cur_diff >= 32768) {
/* we're getting close to the 64k limit. fail early
to make it less likely that two processes increase
More information about the dovecot-cvs
mailing list