summaryrefslogtreecommitdiffstats
path: root/lib/lz4.c
diff options
context:
space:
mode:
authorW. Felix Handte <w@felixhandte.com>2018-02-14 01:06:24 (GMT)
committerW. Felix Handte <w@felixhandte.com>2018-03-12 18:58:43 (GMT)
commit00eadadbfc37587e88733942a252c2f106c67ef2 (patch)
treeddcc936e13a21aa1288668c30f087a1a16c77898 /lib/lz4.c
parentd571d0cdbaa7032fff48543f272f6d5472041aa7 (diff)
downloadlz4-00eadadbfc37587e88733942a252c2f106c67ef2.zip
lz4-00eadadbfc37587e88733942a252c2f106c67ef2.tar.gz
lz4-00eadadbfc37587e88733942a252c2f106c67ef2.tar.bz2
Reset Table on Inputs Larger than 2KB
Diffstat (limited to 'lib/lz4.c')
-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);