[dovecot-cvs] dovecot/src/lib-index mail-index.c,1.260,1.261

tss at dovecot.org tss at dovecot.org
Tue Jan 23 11:19:44 UTC 2007


Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv3972

Modified Files:
	mail-index.c 
Log Message:
Fix for last check



Index: mail-index.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index.c,v
retrieving revision 1.260
retrieving revision 1.261
diff -u -d -r1.260 -r1.261
--- mail-index.c	23 Jan 2007 10:01:13 -0000	1.260
+++ mail-index.c	23 Jan 2007 11:19:41 -0000	1.261
@@ -791,7 +791,8 @@
 		records_size = (size_t)hdr->messages_count * hdr->record_size;
 
 		if ((uoff_t)st.st_size - hdr->header_size < records_size ||
-		    records_size / hdr->messages_count != hdr->record_size) {
+		    (hdr->record_size != 0 &&
+		     records_size / hdr->record_size != hdr->messages_count)) {
 			records_count = (st.st_size - hdr->header_size) /
 				hdr->record_size;
 			mail_index_set_error(index, "Corrupted index file %s: "



More information about the dovecot-cvs mailing list