diff options
author | Yann Collet <Cyan4973@users.noreply.github.com> | 2019-08-10 00:08:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-10 00:08:03 (GMT) |
commit | dfad84ca3eca2fb89a1cdb5adf829975035827d5 (patch) | |
tree | 9af7fb7a0b32809791cad70c12eda3dc9ccb48c7 | |
parent | 1bcde6414a68094601ecd57a968808fdd43fb986 (diff) | |
parent | d7cad81093cd805110291f84d64d385557d0ffba (diff) | |
download | lz4-dfad84ca3eca2fb89a1cdb5adf829975035827d5.zip lz4-dfad84ca3eca2fb89a1cdb5adf829975035827d5.tar.gz lz4-dfad84ca3eca2fb89a1cdb5adf829975035827d5.tar.bz2 |
Merge pull request #777 from terrelln/off-by-one
[LZ4_compress_destSize] Fix off-by-one error
-rw-r--r-- | lib/lz4.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1040,7 +1040,7 @@ _next_match: ip -= matchCode - newMatchCode; assert(newMatchCode < matchCode); matchCode = newMatchCode; - if (unlikely(ip < filledIp)) { + if (unlikely(ip <= filledIp)) { /* We have already filled up to filledIp so if ip ends up less than filledIp * we have positions in the hash table beyond the current position. This is * a problem if we reuse the hash table. So we have to remove these positions |