[dovecot-cvs] dovecot/src/lib-storage/index index-mail.c,1.81,1.82

cras at dovecot.org cras at dovecot.org
Sun Jul 3 18:14:42 EEST 2005


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

Modified Files:
	index-mail.c 
Log Message:
Don't crash if hdr.message-id isn't set in cache file.



Index: index-mail.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/index-mail.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- index-mail.c	3 Jul 2005 14:18:28 -0000	1.81
+++ index-mail.c	3 Jul 2005 15:14:40 -0000	1.82
@@ -802,8 +802,9 @@
 		unsigned int cache_field2 =
 			cache_fields[MAIL_CACHE_IMAP_ENVELOPE].idx;
 
-		if (mail_cache_field_exists(cache_view, seq,
-					    cache_field1) == 0 &&
+		if ((cache_field1 == (unsigned int)-1 ||
+		     mail_cache_field_exists(cache_view, seq,
+					     cache_field1) == 0) &&
 		    mail_cache_field_exists(cache_view, seq,
 					    cache_field2) == 0)
 			data->access_part |= PARSE_HDR;



More information about the dovecot-cvs mailing list