diff options
author | Nick Terrell <terrelln@fb.com> | 2019-07-18 19:20:29 (GMT) |
---|---|---|
committer | Nick Terrell <terrelln@fb.com> | 2019-07-18 19:20:29 (GMT) |
commit | 7c32101c655d93b61fc212dcd512b87119dd7333 (patch) | |
tree | 2c3334f38fd03312df1036d456f551fbf8dd2679 /lib | |
parent | 19b099986aeccc12bb46ad207fe8de5b36bdb7bc (diff) | |
download | lz4-7c32101c655d93b61fc212dcd512b87119dd7333.zip lz4-7c32101c655d93b61fc212dcd512b87119dd7333.tar.gz lz4-7c32101c655d93b61fc212dcd512b87119dd7333.tar.bz2 |
[LZ4_compress_destSize] Fix off-by-one error in fix
The next match is looking at the current ip, not the next ip,
so it needs to be cleared as well.
Credit to OSS-Fuzz
Diffstat (limited to 'lib')
-rw-r--r-- | lib/lz4.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1042,7 +1042,7 @@ _next_match: */ const BYTE* ptr; DEBUGLOG(5, "Clearing %u positions", (U32)(filledIp - ip)); - for (ptr = ip + 1; ptr <= filledIp; ++ptr) { + for (ptr = ip; ptr <= filledIp; ++ptr) { U32 const h = LZ4_hashPosition(ptr, tableType); LZ4_clearHash(h, cctx->hashTable, tableType); } |