[dovecot-cvs] dovecot/src/lib-index mail-index-transaction.c, 1.61,
1.62
cras at dovecot.org
cras at dovecot.org
Wed Jun 15 00:17:09 EEST 2005
Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv14469
Modified Files:
mail-index-transaction.c
Log Message:
mail_index_keywords_create() crashed with 64bit systems and not exactly
correct with 32bit systems either, if it was given empty list of keywords.
Index: mail-index-transaction.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-transaction.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- mail-index-transaction.c 23 May 2005 20:50:18 -0000 1.61
+++ mail-index-transaction.c 14 Jun 2005 21:17:06 -0000 1.62
@@ -847,12 +847,12 @@
struct mail_keywords *k;
unsigned int i, count;
- if (keywords == NULL) {
+ count = strarray_length(keywords);
+ if (count == 0) {
k = i_new(struct mail_keywords, 1);
k->index = index;
return k;
}
- count = strarray_length(keywords);
/* @UNSAFE */
k = i_malloc(sizeof(struct mail_keywords) +
More information about the dovecot-cvs
mailing list