Initialize the last byte of the dictionary to zero so that
authorLasse Collin <lasse.collin@tukaani.org>
Tue, 11 Mar 2008 13:17:16 +0000 (15:17 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Tue, 11 Mar 2008 13:17:16 +0000 (15:17 +0200)
lz_get_byte(lz, 0) returns zero. This was broken by
1a3b21859818e4d8e89a1da99699233c1bfd197d.

src/liblzma/lz/lz_decoder.c

index 63945a1..a400bde 100644 (file)
@@ -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;