[dovecot-cvs] dovecot/src/lib-storage/index index-mail.c, 1.107, 1.108

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


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

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



Index: index-mail.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/index-mail.c,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -d -r1.107 -r1.108
--- index-mail.c	10 Sep 2006 12:48:25 -0000	1.107
+++ index-mail.c	16 Sep 2006 13:40:18 -0000	1.108
@@ -144,7 +144,7 @@
 	unsigned int i, count, names_count;
 
 	if (array_is_created(&data->keywords))
-		return array_get(&data->keywords, NULL);
+		return array_idx(&data->keywords, 0);
 
 	t_push();
 	t_array_init(&keyword_indexes_arr, 128);
@@ -175,7 +175,7 @@
 	(void)array_append_space(&data->keywords);
 
 	t_pop();
-	return array_get(&data->keywords, NULL);
+	return array_idx(&data->keywords, 0);
 }
 
 const struct message_part *index_mail_get_parts(struct mail *_mail)



More information about the dovecot-cvs mailing list