]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-compression: istream-lzma - Fix EOF handling
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 9 Sep 2020 09:46:51 +0000 (12:46 +0300)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Thu, 10 Sep 2020 13:52:25 +0000 (13:52 +0000)
lzma_stream_end() call was accidentally dropped by
c6248b825d8c6562b1320e51ad0d88e99b9fbe85

This (probably) didn't result in visible problems.

src/lib-compression/istream-lzma.c

index 63509556eb3a791bc6420eda32e3542f4398173a..7bc02d99a38569de3c3a37d868e6b8494d3f2330 100644 (file)
@@ -117,6 +117,7 @@ static ssize_t i_stream_lzma_read(struct istream_private *stream)
                                stream->parent->stream_errno;
                } else {
                        i_assert(stream->parent->eof);
+                       lzma_stream_end(zstream);
                        ret = lzma_code(&zstream->strm, LZMA_FINISH);
                        if (ret != LZMA_STREAM_END)
                                if (lzma_handle_error(zstream, ret) == 0)