summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Collet <Cyan4973@users.noreply.github.com>2019-07-19 22:22:51 (GMT)
committerGitHub <noreply@github.com>2019-07-19 22:22:51 (GMT)
commit7a516411d495ac2f86c7569cc77bdbcb62be0838 (patch)
treed28fd06b4d130ba97a4c645558527c4cd3b3dea0
parentee23c273e22aafb3e4d07f3429e59e4e31e6b37d (diff)
parent7c32101c655d93b61fc212dcd512b87119dd7333 (diff)
downloadlz4-7a516411d495ac2f86c7569cc77bdbcb62be0838.zip
lz4-7a516411d495ac2f86c7569cc77bdbcb62be0838.tar.gz
lz4-7a516411d495ac2f86c7569cc77bdbcb62be0838.tar.bz2
Merge pull request #760 from terrelln/destSize
[LZ4_compress_destSize] Fix off-by-one error in fix
-rw-r--r--lib/lz4.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/lz4.c b/lib/lz4.c
index 81b3c10..c8f49cc 100644
--- a/lib/lz4.c
+++ b/lib/lz4.c
@@ -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);
}