]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Ensure list index is present
authorAki Tuomi <aki.tuomi@dovecot.fi>
Tue, 11 Jul 2017 07:26:38 +0000 (10:26 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 12 Jul 2017 22:00:33 +0000 (01:00 +0300)
Otherwise we end up with signal 11 crash later on.

src/lib-storage/list/mailbox-list-index.c

index d1c63d6522886486b58c7b7eb714ba945d34f6d5..f84be7feb49dcc8735e35f5a917de9c751f47ffe 100644 (file)
@@ -66,6 +66,8 @@ int mailbox_list_index_index_open(struct mailbox_list *list)
        if (mailbox_list_mkdir_missing_index_root(list) < 0)
                return -1;
 
+       i_assert(ilist->index != NULL);
+
        index_flags = mail_storage_settings_to_index_flags(set);
        if (strcmp(list->name, MAILBOX_LIST_NAME_INDEX) == 0) {
                /* LAYOUT=index. this is the only location for the mailbox