]> git.ipfire.org Git - thirdparty/zstd.git/commit
[bug-fix] Make simple single-pass functions ignore advanced parameters 2498/head
authorNick Terrell <terrelln@fb.com>
Sat, 13 Feb 2021 02:52:08 +0000 (18:52 -0800)
committerNick Terrell <terrelln@fb.com>
Sat, 13 Feb 2021 03:11:23 +0000 (19:11 -0800)
commit7736549beaee6408969dbcce478e2e3760483f3c
treeb78f4161da96707a0287ec9ebb6deea1d1b4a4fa
parentf39178b445f96b456881268d29779964633f527d
[bug-fix] Make simple single-pass functions ignore advanced parameters

The simple compression functions are intended to ignore the advanced
parameters, but they were accidentally using them. All the
`ZSTD_parameters` were set correctly, but any extra parameters were
used as-is. E.g. `ZSTD_c_format`.

This PR makes all the simple single-pass functions listed below ignore
the advanced parameters, as intended.

* `ZSTD_compressCCtx()`
* `ZSTD_compress_usingDict()`
* `ZSTD_compress_usingCDict()`
* `ZSTD_compress_advanced()`
* `ZSTD_compress_usingCDict_advanced()`

It also adds a test case that ensures that each of these functions
ignore the advanced parameters.
lib/compress/zstd_compress.c
tests/fuzzer.c