# HG changeset patch # User Timo Sirainen # Date 1265483118 -7200 # Node ID a9710cb350c0225d7380f8277073a57605d06767 # Parent 99caf87fb3cef72a0aac75f306f87124cd59ab31 maildir: Avoid infinite loops while reading uidlist. 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 @@ } 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);