[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-uidlist.c, 1.51.2.11, 1.51.2.12

tss at dovecot.org tss at dovecot.org
Wed May 9 16:12:12 EEST 2007


Update of /var/lib/cvs/dovecot/src/lib-storage/index/maildir
In directory talvi:/tmp/cvs-serv29794

Modified Files:
      Tag: branch_1_0
	maildir-uidlist.c 
Log Message:
Make sure uid_validity and next_uid aren't 0 in the uidlist header.



Index: maildir-uidlist.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-uidlist.c,v
retrieving revision 1.51.2.11
retrieving revision 1.51.2.12
diff -u -d -r1.51.2.11 -r1.51.2.12
--- maildir-uidlist.c	23 Mar 2007 20:23:20 -0000	1.51.2.11
+++ maildir-uidlist.c	9 May 2007 13:12:09 -0000	1.51.2.12
@@ -347,6 +347,11 @@
 			"%s: next_uid was lowered (%u -> %u)",
 			uidlist->fname, uidlist->next_uid, next_uid);
 		ret = 0;
+	} else if (uid_validity == 0 || next_uid == 0) {
+                mail_storage_set_critical(storage,
+			"%s: Broken header (uidvalidity = %u, next_uid=%u)",
+			uidlist->fname, uid_validity, next_uid);
+		ret = 0;
 	} else {
 		uidlist->uid_validity = uid_validity;
 		uidlist->next_uid = next_uid;



More information about the dovecot-cvs mailing list