[dovecot-cvs] dovecot/src/lib-storage/index/dbox dbox-file.c, 1.5, 1.6

cras at dovecot.org cras at dovecot.org
Sun Feb 5 14:08:15 EET 2006


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

Modified Files:
	dbox-file.c 
Log Message:
Don't break if keyword_count is for some reason 0 in dbox file.



Index: dbox-file.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-file.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- dbox-file.c	28 Jan 2006 22:05:48 -0000	1.5
+++ dbox-file.c	5 Feb 2006 12:08:13 -0000	1.6
@@ -232,7 +232,8 @@
 	}
 
 	i_free(file->seeked_keywords);
-	file->seeked_keywords = i_malloc(file->keyword_count);
+	file->seeked_keywords = file->keyword_count == 0 ? NULL :
+		i_malloc(file->keyword_count);
 	return 0;
 }
 



More information about the dovecot-cvs mailing list