Merge pull request #760 from terrelln/destSize

[LZ4_compress_destSize] Fix off-by-one error in fix
This commit is contained in:
Yann Collet 2019-07-19 15:22:51 -07:00 committed by GitHub
commit 7a516411d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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