[dovecot-cvs] dovecot/src/lib-index mail-index-sync.c, 1.77, 1.78 mail-index-transaction.c, 1.80, 1.81

cras at dovecot.org cras at dovecot.org
Sat Sep 16 16:40:20 EEST 2006


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

Modified Files:
	mail-index-sync.c mail-index-transaction.c 
Log Message:
Don't allow giving NULL parameter to array_get() or array_get_modifiable().



Index: mail-index-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-sync.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- mail-index-sync.c	10 Sep 2006 12:48:18 -0000	1.77
+++ mail-index-sync.c	16 Sep 2006 13:40:17 -0000	1.78
@@ -234,7 +234,7 @@
 	}
 
 	keyword_updates = keyword_count == 0 ? NULL :
-		array_get(&ctx->trans->keyword_updates, NULL);
+		array_idx(&ctx->trans->keyword_updates, 0);
 	for (i = 0; i < keyword_count; i++) {
 		if (array_is_created(&keyword_updates[i].add_seq)) {
 			synclist = array_append_space(&ctx->sync_list);

Index: mail-index-transaction.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-transaction.c,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -d -r1.80 -r1.81
--- mail-index-transaction.c	10 Sep 2006 12:48:18 -0000	1.80
+++ mail-index-transaction.c	16 Sep 2006 13:40:17 -0000	1.81
@@ -852,7 +852,7 @@
 	k->index = t->view->index;
 	k->count = count;
 
-	memcpy(k->idx, array_get(keyword_indexes, NULL),
+	memcpy(k->idx, array_idx(keyword_indexes, 0),
 	       count * sizeof(k->idx[0]));
 	return k;
 }



More information about the dovecot-cvs mailing list