[dovecot-cvs] dovecot/src/lib-index mail-index-transaction.c, 1.86, 1.87
tss at dovecot.org
tss at dovecot.org
Fri Mar 16 18:11:00 EET 2007
Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv3959
Modified Files:
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.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- mail-index-transaction.c 6 Mar 2007 20:19:08 -0000 1.86
+++ mail-index-transaction.c 16 Mar 2007 16:10:58 -0000 1.87
@@ -288,8 +288,13 @@
i_free(sorted_recs);
/* fix the order in extensions */
- ext_rec_arrays = array_get_modifiable(&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_modifiable(&t->ext_rec_updates,
+ &ext_rec_array_count);
+ }
for (j = 0; j < ext_rec_array_count; j++) {
ARRAY_TYPE(seq_array) *old_array = &ext_rec_arrays[j];
ARRAY_TYPE(seq_array) new_array;
More information about the dovecot-cvs
mailing list