[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync-parse.c, 1.24, 1.25

cras at dovecot.org cras at dovecot.org
Mon Sep 13 13:47:18 EEST 2004


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

Modified Files:
	mbox-sync-parse.c 
Log Message:
Don't crash if matching fails and we don't have header md5 sums saved.



Index: mbox-sync-parse.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-parse.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- mbox-sync-parse.c	5 Sep 2004 17:53:46 -0000	1.24
+++ mbox-sync-parse.c	13 Sep 2004 10:47:16 -0000	1.25
@@ -523,5 +523,6 @@
 		mail_storage_set_index_error(ibox);
 		return -1;
 	}
-	return memcmp(data, ctx.hdr_md5_sum, 16) == 0;
+	return data == NULL ? 0 :
+		memcmp(data, ctx.hdr_md5_sum, 16) == 0;
 }



More information about the dovecot-cvs mailing list