[dovecot-cvs] dovecot/src/lib-storage/index index-status.c,1.23,1.24

cras at procontrol.fi cras at procontrol.fi
Thu May 8 06:09:47 EEST 2003


Update of /home/cvs/dovecot/src/lib-storage/index
In directory danu:/tmp/cvs-serv3879/lib-storage/index

Modified Files:
	index-status.c 
Log Message:
Don't crash with invalid first_unseen_uid_lowwater



Index: index-status.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/index-status.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- index-status.c	5 Jan 2003 13:09:52 -0000	1.23
+++ index-status.c	8 May 2003 02:09:45 -0000	1.24
@@ -21,6 +21,10 @@
 	if (lowwater_uid == hdr->next_uid) {
 		/* no unseen messages */
 		rec = NULL;
+	} else if (lowwater_uid > hdr->next_uid) {
+		index_set_corrupted(index, "first_unseen_uid_lowwater %u >= "
+				    "next_uid %u", lowwater_uid, hdr->next_uid);
+		return 0;
 	} else if (lowwater_uid != 0) {
 		/* begin scanning from the low water mark */
 		rec = index->lookup_uid_range(index, lowwater_uid,




More information about the dovecot-cvs mailing list