dovecot: Don't crash when mapping after mail_index_mark_corrupted()

dovecot at dovecot.org dovecot at dovecot.org
Wed Jul 18 09:26:38 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/8418a23cb3f4
changeset: 6073:8418a23cb3f4
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Jul 18 08:36:20 2007 +0300
description:
Don't crash when mapping after mail_index_mark_corrupted()

diffstat:

1 file changed, 1 insertion(+), 1 deletion(-)
src/lib-index/mail-index-map.c |    2 +-

diffs (12 lines):

diff -r 461496644c67 -r 8418a23cb3f4 src/lib-index/mail-index-map.c
--- a/src/lib-index/mail-index-map.c	Wed Jul 18 08:20:43 2007 +0300
+++ b/src/lib-index/mail-index-map.c	Wed Jul 18 08:36:20 2007 +0300
@@ -745,7 +745,7 @@ int mail_index_map(struct mail_index *in
 		index->map = mail_index_map_alloc(index);
 
 	/* first try updating the existing mapping from transaction log. */
-	if (index->map->hdr.indexid != 0) {
+	if (index->map->hdr.indexid != 0 && index->indexid != 0) {
 		/* we're not creating the index, or opening transaction log.
 		   sync this as a view from transaction log. */
 		ret = mail_index_sync_map(&index->map, type, FALSE);


More information about the dovecot-cvs mailing list