]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dbox crashfix
authorTimo Sirainen <tss@iki.fi>
Tue, 6 Jan 2009 17:04:09 +0000 (12:04 -0500)
committerTimo Sirainen <tss@iki.fi>
Tue, 6 Jan 2009 17:04:09 +0000 (12:04 -0500)
--HG--
branch : HEAD

src/lib-storage/index/dbox/dbox-index.c

index 9a8594763c878d71ea11f3f82343d3095530617e..ff41a4d4bc7bd2c9edce8d1da54e02d32c099871 100644 (file)
@@ -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;