1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00

Fix missing initialization in lzma_strm_init().

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 18c10c30d2
but only when decompressing .lzma files. Somehow I managed
to miss testing that with Valgrind earlier.

This fixes <http://bugs.gentoo.org/show_bug.cgi?id=305591>.
Thanks to Rafał Mużyło for helping to debug it on IRC.
This commit is contained in:
Lasse Collin 2010-03-06 21:17:20 +02:00
parent eb7d51a3fa
commit d0d1c51aea

View file

@ -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;