]> git.ipfire.org Git - thirdparty/zstd.git/commit
Cap hashLog & chainLog to ensure that we only use 32 bits of hash
authorNick Terrell <terrelln@fb.com>
Fri, 20 Jan 2023 00:27:24 +0000 (16:27 -0800)
committerNick Terrell <nickrterrell@gmail.com>
Fri, 20 Jan 2023 22:05:26 +0000 (14:05 -0800)
commit666944fbe6bb5e6d84a343ad4df525af79720165
tree849023c3c150be521683b6f36579255c258bcea3
parentabf965c64a6f0c9fa30399491b946c153e8ba801
Cap hashLog & chainLog to ensure that we only use 32 bits of hash

* Cap shortCache chainLog to 24
* Cap row match finder hashLog so that rowLog <= 24
* Add unit tests to expose all cases. The row match finder unit tests
  are only run in 64-bit mode, because they allocate ~1GB.

Fixes #3336
lib/compress/zstd_compress.c
lib/compress/zstd_lazy.c
lib/compress/zstd_lazy.h
tests/fuzzer.c
tests/zstreamtest.c