From 3ce1916c83041113b9cad9ead5c97a527cf8aa1d Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Sun, 16 Aug 2009 22:15:13 +0300 Subject: Fix data corruption in LZ/LZMA2 encoder. Thanks to Jonathan Stott for the bug report. --- src/liblzma/lz/lz_encoder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/liblzma/lz/lz_encoder.h b/src/liblzma/lz/lz_encoder.h index 4904c229..35e9ebbf 100644 --- a/src/liblzma/lz/lz_encoder.h +++ b/src/liblzma/lz/lz_encoder.h @@ -234,7 +234,7 @@ mf_avail(const lzma_mf *mf) static inline uint32_t mf_unencoded(const lzma_mf *mf) { - return mf->write_pos - mf->read_pos - mf->read_ahead; + return mf->write_pos - mf->read_pos + mf->read_ahead; } -- cgit v1.2.3