summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/lz4.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/lz4.c b/lib/lz4.c
index 7c5b444..4810910 100644
--- a/lib/lz4.c
+++ b/lib/lz4.c
@@ -539,7 +539,8 @@ LZ4_FORCE_INLINE void LZ4_resetTable(
cctx->currentOffset + inputSize >= 0xFFFFU) ||
(tableType == byU32 &&
cctx->currentOffset > 1 GB) ||
- tableType == byPtr))
+ tableType == byPtr ||
+ inputSize >= 2 KB))
{
DEBUGLOG(4, "Resetting table in %p", cctx);
MEM_INIT(cctx->hashTable, 0, LZ4_HASHTABLESIZE);