1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00

Fix off-by-one in LZ decoder.

Fortunately, this bug had no security risk other than accepting
some corrupt files as valid.
This commit is contained in:
Lasse Collin 2009-04-10 11:17:02 +03:00
parent 94eb9ad46f
commit e79c42d854

View file

@ -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;
}