aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2009-04-10 11:17:02 +0300
committerLasse Collin <lasse.collin@tukaani.org>2009-04-10 11:17:02 +0300
commite79c42d854657ae7f75613bd80c1a35ff7c525cb (patch)
treebe04ca5cfcb4c66ced1c109f230973cbd6646959
parentFix minor typos in README (diff)
downloadxz-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.
-rw-r--r--src/liblzma/lz/lz_decoder.h2
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;
}