From d0d1c51aea4351288a7e533cce28cb7f852f6b05 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Sat, 6 Mar 2010 21:17:20 +0200 Subject: [PATCH] Fix missing initialization in lzma_strm_init(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit With bad luck, lzma_code() could return LZMA_BUF_ERROR when it shouldn't. This has been here since the early days of liblzma. It got triggered by the modifications made to the xz tool in commit 18c10c30d2833f394cd7bce0e6a821044b15832f but only when decompressing .lzma files. Somehow I managed to miss testing that with Valgrind earlier. This fixes . Thanks to Rafał Mużyło for helping to debug it on IRC. --- src/liblzma/common/common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/liblzma/common/common.c b/src/liblzma/common/common.c index edce90cd..2f185e49 100644 --- a/src/liblzma/common/common.c +++ b/src/liblzma/common/common.c @@ -161,6 +161,7 @@ lzma_strm_init(lzma_stream *strm) strm->internal->supported_actions[LZMA_FULL_FLUSH] = false; strm->internal->supported_actions[LZMA_FINISH] = false; strm->internal->sequence = ISEQ_RUN; + strm->internal->allow_buf_error = false; strm->total_in = 0; strm->total_out = 0; -- 2.11.4.GIT