diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2009-08-16 22:15:13 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2009-08-16 22:15:13 +0300 |
commit | 3ce1916c83041113b9cad9ead5c97a527cf8aa1d (patch) | |
tree | fd072d8e9c6e73ba0202712027e6204ec959f0c3 /src/liblzma | |
parent | Updated INSTALL and PACKAGERS to match the changes (diff) | |
download | xz-3ce1916c83041113b9cad9ead5c97a527cf8aa1d.tar.xz |
Fix data corruption in LZ/LZMA2 encoder.
Thanks to Jonathan Stott for the bug report.
Diffstat (limited to 'src/liblzma')
-rw-r--r-- | src/liblzma/lz/lz_encoder.h | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |