From f310c50286d9e4e9c6170bb65348c9bb430a65b4 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Tue, 11 Mar 2008 15:17:16 +0200 Subject: [PATCH] Initialize the last byte of the dictionary to zero so that lz_get_byte(lz, 0) returns zero. This was broken by 1a3b21859818e4d8e89a1da99699233c1bfd197d. --- src/liblzma/lz/lz_decoder.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/liblzma/lz/lz_decoder.c b/src/liblzma/lz/lz_decoder.c index 63945a1..a400bde 100644 --- a/src/liblzma/lz/lz_decoder.c +++ b/src/liblzma/lz/lz_decoder.c @@ -433,6 +433,7 @@ lzma_lz_decoder_reset(lzma_lz_decoder *lz, lzma_allocator *allocator, lz->pos = 0; lz->start = 0; lz->end = dict_real_size; + lz->dict[dict_real_size - 1] = 0; lz->is_full = false; lz->eopm_detected = false; lz->next_finished = false;