commit | e79c42d854657ae7f75613bd80c1a35ff7c525cb | [log] [tgz] |
---|---|---|
author | Lasse Collin <lasse.collin@tukaani.org> | Fri Apr 10 11:17:02 2009 +0300 |
committer | Lasse Collin <lasse.collin@tukaani.org> | Fri Apr 10 11:17:02 2009 +0300 |
tree | be04ca5cfcb4c66ced1c109f230973cbd6646959 | |
parent | 94eb9ad46f1fded6d8369cf3d38bb9754c1375af [diff] |
Fix off-by-one in LZ decoder. Fortunately, this bug had no security risk other than accepting some corrupt files as valid.
diff --git a/src/liblzma/lz/lz_decoder.h b/src/liblzma/lz/lz_decoder.h index 9041d0b..79b8c8c 100644 --- a/src/liblzma/lz/lz_decoder.h +++ b/src/liblzma/lz/lz_decoder.h
@@ -126,7 +126,7 @@ static inline bool dict_is_distance_valid(const lzma_dict *const dict, const size_t distance) { - return dict->full >= distance; + return dict->full > distance; }