diff --git a/dovecot-2.3.8-blockcount.patch b/dovecot-2.3.8-blockcount.patch new file mode 100644 index 0000000..fb0a9b0 --- /dev/null +++ b/dovecot-2.3.8-blockcount.patch @@ -0,0 +1,20 @@ +diff -up dovecot-2.3.8/src/lib-storage/index/index-mail-binary.c.blockcount dovecot-2.3.8/src/lib-storage/index/index-mail-binary.c +--- dovecot-2.3.8/src/lib-storage/index/index-mail-binary.c.blockcount 2020-12-02 11:34:10.229027593 +0100 ++++ dovecot-2.3.8/src/lib-storage/index/index-mail-binary.c 2020-12-02 11:36:47.328933276 +0100 +@@ -339,13 +339,14 @@ blocks_count_lines(struct binary_ctx *ct + i_stream_skip(full_input, skip); + cur_block_offset += skip; + +- if (cur_block->input->eof) { ++ if (i_stream_read_eof(cur_block->input)) { + /* go to the next block */ +- if (++block_idx == block_count) { ++ if (block_idx+1 == block_count) { + i_assert(i_stream_read_eof(full_input)); + ret = -1; + break; + } ++ block_idx++; + cur_block++; + cur_block_offset = 0; + } diff --git a/dovecot.spec b/dovecot.spec index b02a5b8..2ef4c5f 100644 --- a/dovecot.spec +++ b/dovecot.spec @@ -5,7 +5,7 @@ Name: dovecot Epoch: 1 Version: 2.3.14 %global prever %{nil} -Release: 4%{?dist} +Release: 5%{?dist} #dovecot itself is MIT, a few sources are PD, pigeonhole is LGPLv2 License: MIT and LGPLv2 @@ -39,6 +39,7 @@ Patch15: dovecot-2.3.11-bigkey.patch # hard to break circular dependency between lib and lib-dcrypt Patch16: dovecot-2.3.6-opensslhmac.patch Patch17: dovecot-2.3.14-opensslv3.patch +Patch18: dovecot-2.3.8-blockcount.patch Source15: prestartscript @@ -129,6 +130,7 @@ This package provides the development files for dovecot. %patch15 -p1 -b .bigkey %patch16 -p1 -b .opensslhmac %patch17 -p1 -b .opensslv3 +%patch18 -p1 -b .blockcount #pushd dovecot-2*3-pigeonhole-%{pigeonholever} #popd @@ -454,6 +456,9 @@ make check %{_libdir}/%{name}/dict/libdriver_pgsql.so %changelog +* Wed Jul 14 2021 Michal Hlavinka - 1:2.3.14-5 +- fix mail storage block count parsing (#1974281) + * Wed Jun 16 2021 Mohan Boddu - 1:2.3.14-4 - Rebuilt for RHEL 9 BETA for openssl 3.0 Related: rhbz#1971065