dovecot: Handle first_recent_uid=0 without crashing, even though...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Feb 11 23:52:12 EET 2008
details: http://hg.dovecot.org/dovecot/rev/0706d404a8fb
changeset: 7231:0706d404a8fb
user: Timo Sirainen <tss at iki.fi>
date: Mon Feb 11 23:52:09 2008 +0200
description:
Handle first_recent_uid=0 without crashing, even though it shouldn't happen..
diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
src/lib-storage/index/maildir/maildir-sync-index.c | 2 +-
diffs (12 lines):
diff -r 777131d76168 -r 0706d404a8fb src/lib-storage/index/maildir/maildir-sync-index.c
--- a/src/lib-storage/index/maildir/maildir-sync-index.c Mon Feb 11 21:41:41 2008 +0200
+++ b/src/lib-storage/index/maildir/maildir-sync-index.c Mon Feb 11 23:52:09 2008 +0200
@@ -298,7 +298,7 @@ int maildir_sync_index(struct maildir_in
hdr_next_uid = hdr->next_uid;
mbox->syncing_commit = TRUE;
- seq = prev_uid = 0; first_recent_uid = hdr->first_recent_uid;
+ seq = prev_uid = 0; first_recent_uid = I_MAX(hdr->first_recent_uid, 1);
t_array_init(&ctx->keywords, MAILDIR_MAX_KEYWORDS);
t_array_init(&idx_keywords, MAILDIR_MAX_KEYWORDS);
iter = maildir_uidlist_iter_init(mbox->uidlist);
More information about the dovecot-cvs
mailing list