dovecot-1.2: maildir: Avoid infinite loops while reading uidlist.

dovecot at dovecot.org dovecot at dovecot.org
Sat Feb 6 21:05:25 EET 2010


details:   http://hg.dovecot.org/dovecot-1.2/rev/a9710cb350c0
changeset: 9542:a9710cb350c0
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Feb 06 21:05:18 2010 +0200
description:
maildir: Avoid infinite loops while reading uidlist.

diffstat:

1 file changed, 5 insertions(+), 9 deletions(-)
src/lib-storage/index/maildir/maildir-uidlist.c |   14 +++++---------

diffs (24 lines):

diff -r 99caf87fb3ce -r a9710cb350c0 src/lib-storage/index/maildir/maildir-uidlist.c
--- a/src/lib-storage/index/maildir/maildir-uidlist.c	Sat Feb 06 20:30:21 2010 +0200
+++ b/src/lib-storage/index/maildir/maildir-uidlist.c	Sat Feb 06 21:05:18 2010 +0200
@@ -376,15 +376,11 @@ static void maildir_uidlist_update_hdr(s
 	}
 
 	mhdr = &uidlist->mbox->maildir_hdr;
-	if (mhdr->uidlist_mtime == 0) {
-		if (!uidlist->initial_read)
-			(void)maildir_uidlist_refresh(uidlist);
-		if (uidlist->version != UIDLIST_VERSION) {
-			/* upgrading from older verson. don't update the
-			   uidlist times until it uses the new format */
-			uidlist->recreate = TRUE;
-			return;
-		}
+	if (mhdr->uidlist_mtime == 0 && uidlist->version != UIDLIST_VERSION) {
+		/* upgrading from older verson. don't update the
+		   uidlist times until it uses the new format */
+		uidlist->recreate = TRUE;
+		return;
 	}
 	mhdr->uidlist_mtime = st->st_mtime;
 	mhdr->uidlist_mtime_nsecs = ST_MTIME_NSEC(*st);


More information about the dovecot-cvs mailing list