]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: mailbox_get_expunge*() - Fix assert-crash on index corruption
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 3 Aug 2021 17:38:13 +0000 (20:38 +0300)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 4 Oct 2021 07:46:52 +0000 (07:46 +0000)
This happened in the very unlikely situation that indexes became corrupted
between two mail_transaction_log_view_set() calls.

Fixes:
Panic: file mailbox-get.c: line 112 (mailbox_get_expunges_init): assertion failed: (ret != 0)

src/lib-storage/mailbox-get.c

index e1c1f20163a5529189df9e1c623cb4c3a7bfe45a..84a14ed00e65f6a0f177860b5049f7aa5a1a1fa7 100644 (file)
@@ -109,7 +109,6 @@ mailbox_get_expunges_init(struct mailbox *box, uint64_t prev_modseq,
                                                            box->view->log_file_head_seq,
                                                            box->view->log_file_head_offset,
                                                            &reset, &reason);
-                       i_assert(ret != 0);
                }
                *modseq_too_old_r = TRUE;
        }