]> 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)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 31 Jan 2024 11:37:41 +0000 (13:37 +0200)
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 c7bcbd92eed363ad8f607f003db2276ba6846c0d..f6b6aa9cda44f2bd5aa328b3db9846d77be3f9e7 100644 (file)
@@ -1329,7 +1329,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);