From: Timo Sirainen Date: Tue, 6 Jan 2009 17:04:09 +0000 (-0500) Subject: dbox crashfix X-Git-Tag: 1.2.beta1~151 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9388f3bf76bf29c490087d72de453fa040af476e;p=thirdparty%2Fdovecot%2Fcore.git dbox crashfix --HG-- branch : HEAD --- diff --git a/src/lib-storage/index/dbox/dbox-index.c b/src/lib-storage/index/dbox/dbox-index.c index 9a8594763c..ff41a4d4bc 100644 --- a/src/lib-storage/index/dbox/dbox-index.c +++ b/src/lib-storage/index/dbox/dbox-index.c @@ -774,7 +774,12 @@ static const char *dbox_file_maildir_get_index_data(struct dbox_file *file) const char *pop3_uidl = NULL, *const *changes; unsigned int i, count; - changes = array_get(&file->metadata_changes, &count); + if (array_is_created(&file->metadata_changes)) + changes = array_get(&file->metadata_changes, &count); + else { + changes = NULL; + count = 0; + } for (i = 0; i < count; i++) { if (*changes[i] == DBOX_METADATA_POP3_UIDL) { pop3_uidl = changes[i] + 1;