]> git.ipfire.org Git - thirdparty/zstd.git/commit
Fix off-by-one error in superblock mode (#3221)
authorNick Terrell <terrelln@fb.com>
Wed, 3 Aug 2022 18:28:39 +0000 (11:28 -0700)
committerGitHub <noreply@github.com>
Wed, 3 Aug 2022 18:28:39 +0000 (11:28 -0700)
commita70ca2bd7dbc74d3c9db173e3682532e18565246
tree070433b562136bb3760d31aceb6af2d0249477bc
parent7e6278a706909c8c433377f26aa5165a52edb31a
Fix off-by-one error in superblock mode (#3221)

Fixes #3212.

Long literal and match lengths had an off-by-one error in ZSTD_getSequenceLength.
Fix the off-by-one error, and add a golden compression test that catches the bug.
Also run all the golden tests in the cli-tests framework.
lib/common/zstd_internal.h
lib/decompress/zstd_decompress_block.c
tests/cli-tests/compression/golden.sh [new file with mode: 0755]
tests/cli-tests/decompression/golden.sh [new file with mode: 0755]
tests/cli-tests/dictionaries/golden.sh [new file with mode: 0755]
tests/cli-tests/run.py
tests/golden-compression/large-literal-and-match-lengths [new file with mode: 0644]