]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-index: mail_index_unset_fscked() - Fix to use the latest index header
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 3 Jul 2023 20:46:32 +0000 (23:46 +0300)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 30 Oct 2023 08:40:13 +0000 (08:40 +0000)
The flags field was updated using the view's header, which may have been
out-of-date. This could have resulted in more than the FSCKD flag update,
and most importantly it could have meant that the FSCKD flag wasn't
actually removed when it should have been.

src/lib-index/mail-index-transaction-update.c

index 74f5dc228fe95f15c41df08ef19744b904e0aba4..9535b0409c017e44d74108892cd69434f3203880 100644 (file)
@@ -1331,7 +1331,7 @@ void mail_index_reset(struct mail_index_transaction *t)
 void mail_index_unset_fscked(struct mail_index_transaction *t)
 {
        struct mail_index_header new_hdr =
-               *mail_index_get_header(t->view);
+               t->view->index->map->hdr;
 
        i_assert(t->view->index->log_sync_locked);