diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2009-04-10 11:17:02 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2009-04-10 11:17:02 +0300 |
commit | e79c42d854657ae7f75613bd80c1a35ff7c525cb (patch) | |
tree | be04ca5cfcb4c66ced1c109f230973cbd6646959 /src | |
parent | Fix minor typos in README (diff) | |
download | xz-e79c42d854657ae7f75613bd80c1a35ff7c525cb.tar.xz |
Fix off-by-one in LZ decoder.
Fortunately, this bug had no security risk other than accepting
some corrupt files as valid.
Diffstat (limited to 'src')
-rw-r--r-- | src/liblzma/lz/lz_decoder.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liblzma/lz/lz_decoder.h b/src/liblzma/lz/lz_decoder.h index 9041d0bd..79b8c8c5 100644 --- a/src/liblzma/lz/lz_decoder.h +++ b/src/liblzma/lz/lz_decoder.h @@ -126,7 +126,7 @@ dict_is_empty(const lzma_dict *const dict) static inline bool dict_is_distance_valid(const lzma_dict *const dict, const size_t distance) { - return dict->full >= distance; + return dict->full > distance; } |