]> git.ipfire.org Git - thirdparty/zstd.git/commit
[fuzz] Allow zero sized buffers for streaming fuzzers (#1945)
authorNick Terrell <terrelln@fb.com>
Thu, 9 Jan 2020 19:38:50 +0000 (11:38 -0800)
committerGitHub <noreply@github.com>
Thu, 9 Jan 2020 19:38:50 +0000 (11:38 -0800)
commitd1cc9d279704057c08ab976618c8bd629bc18f7e
tree4bb84e8d298e2f98d5ad4348e30346d6a74aad4f
parent03ffda7b88da5a37c9c31478494b8768da50a008
[fuzz] Allow zero sized buffers for streaming fuzzers (#1945)

* Allow zero sized buffers in `stream_decompress`. Ensure that we never have two
  zero sized buffers in a row so we guarantee forwards progress.
* Make case 4 in `stream_round_trip` do a zero sized buffers call followed by
  a full call to guarantee forwards progress.
* Fix `limitCopy()` in legacy decoders.
* Fix memcpy in `zstdmt_compress.c`.

Catches the bug fixed in PR #1939
lib/compress/zstdmt_compress.c
lib/legacy/zstd_v04.c
lib/legacy/zstd_v05.c
lib/legacy/zstd_v06.c
lib/legacy/zstd_v07.c
tests/fuzz/stream_decompress.c
tests/fuzz/stream_round_trip.c