]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
lib-index: Handle 0-sized dovecot.index.log record properly
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 8 Apr 2022 10:42:55 +0000 (13:42 +0300)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 14 Apr 2022 06:47:55 +0000 (09:47 +0300)
commit40e2a21f83fb11cd36e109b93d2b3fd704e3536e
tree1f49bb092abad1c0ea0e4221d81506f242889dc3
parent36cbfb8e2b65ba9cfab88bdb1adb38cdae3ee4ec
lib-index: Handle 0-sized dovecot.index.log record properly

The previous behavior was to just silently ignore it and have the next write
to the transaction log silently truncate away the trailing garbage.

Now if the log file isn't locked the issue is still ignored, since it's
possible that this is just a race condition. But if the log is locked,
it's handled as corruption.
src/lib-index/mail-transaction-log-file.c