aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/lz
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2008-03-11 15:17:16 +0200
committerLasse Collin <lasse.collin@tukaani.org>2008-03-11 15:17:16 +0200
commitf310c50286d9e4e9c6170bb65348c9bb430a65b4 (patch)
tree4112397a9786f214e698f5726bd8a5a363d7c52b /src/liblzma/lz
parentReally fix the price count initialization. (diff)
downloadxz-f310c50286d9e4e9c6170bb65348c9bb430a65b4.tar.xz
Initialize the last byte of the dictionary to zero so that
lz_get_byte(lz, 0) returns zero. This was broken by 1a3b21859818e4d8e89a1da99699233c1bfd197d.
Diffstat (limited to 'src/liblzma/lz')
-rw-r--r--src/liblzma/lz/lz_decoder.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/liblzma/lz/lz_decoder.c b/src/liblzma/lz/lz_decoder.c
index 63945a18..a400bde1 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;