[dovecot-cvs] dovecot/src/lib-index mail-index-transaction.c, 1.67, 1.68

cras at dovecot.org cras at dovecot.org
Fri Dec 2 13:30:47 EET 2005


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

Modified Files:
	mail-index-transaction.c 
Log Message:
mail_index_keywords_create_from_indexes(): Don't crash with 64bit systems if there are only 0 keywords.



Index: mail-index-transaction.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-transaction.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- mail-index-transaction.c	25 Nov 2005 15:16:46 -0000	1.67
+++ mail-index-transaction.c	2 Dec 2005 11:30:45 -0000	1.68
@@ -747,6 +747,11 @@
 	unsigned int count;
 
 	count = array_count(keyword_indexes);
+	if (count == 0) {
+		k = i_new(struct mail_keywords, 1);
+		k->index = t->view->index;
+		return k;
+	}
 
 	/* @UNSAFE */
 	k = i_malloc(sizeof(struct mail_keywords) +



More information about the dovecot-cvs mailing list