[dovecot-cvs] dovecot/src/lib-index mail-index-transaction.c, 1.76.2.3, 1.76.2.4

tss at dovecot.org tss at dovecot.org
Fri Mar 16 18:10:58 EET 2007


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

Modified Files:
      Tag: branch_1_0
	mail-index-transaction.c 
Log Message:
Crashfix with nonsorted appends



Index: mail-index-transaction.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-transaction.c,v
retrieving revision 1.76.2.3
retrieving revision 1.76.2.4
diff -u -d -r1.76.2.3 -r1.76.2.4
--- mail-index-transaction.c	6 Mar 2007 20:19:05 -0000	1.76.2.3
+++ mail-index-transaction.c	16 Mar 2007 16:10:55 -0000	1.76.2.4
@@ -318,8 +318,13 @@
 	i_free(sorted_recs);
 
 	/* fix the order in extensions */
-	ext_rec_arrays = array_get_modifyable(&t->ext_rec_updates,
-					      &ext_rec_array_count);
+	if (!array_is_created(&t->ext_rec_updates)) {
+		ext_rec_arrays = NULL;
+		ext_rec_array_count = 0;
+	} else {
+		ext_rec_arrays = array_get_modifyable(&t->ext_rec_updates,
+						      &ext_rec_array_count);
+	}
 	for (j = 0; j < ext_rec_array_count; j++) {
 		array_t *old_array = &ext_rec_arrays[j];
 		ARRAY_SET_TYPE(old_array, void);



More information about the dovecot-cvs mailing list