From: Timo Sirainen Date: Mon, 3 Jul 2023 20:46:32 +0000 (+0300) Subject: lib-index: mail_index_unset_fscked() - Fix to use the latest index header X-Git-Tag: 2.4.0~2476 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6450cac9e062241bad2bc87c4476d858764f7c65;p=thirdparty%2Fdovecot%2Fcore.git lib-index: mail_index_unset_fscked() - Fix to use the latest index header 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. --- diff --git a/src/lib-index/mail-index-transaction-update.c b/src/lib-index/mail-index-transaction-update.c index 74f5dc228f..9535b0409c 100644 --- a/src/lib-index/mail-index-transaction-update.c +++ b/src/lib-index/mail-index-transaction-update.c @@ -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);