diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-12-28 20:16:24 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-12-31 12:37:47 +0100 |
commit | c1411a1132595bddbca254322d85bfe24b038536 (patch) | |
tree | 87eefb8515d0e5cd18b16156dd31db6766548b9a | |
parent | f78dc6608933d27b51a3d629327b6b9b982013f5 (diff) | |
download | ffmpeg-c1411a1132595bddbca254322d85bfe24b038536.tar.gz |
tools/target_dec_fuzzer: Stop negative block_align and sampling rate
These are checked for early in avcodec_open2() and do not really test the decoder
but instead waste resources which could be better spend fuzzing the actual decoder
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | tools/target_dec_fuzzer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index c232f6d41a..2d9d28b46d 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -206,9 +206,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { extradata_size = bytestream2_get_le32(&gbc); - ctx->sample_rate = bytestream2_get_le32(&gbc); + ctx->sample_rate = bytestream2_get_le32(&gbc) & 0x7FFFFFFF; ctx->channels = (unsigned)bytestream2_get_le32(&gbc) % FF_SANE_NB_CHANNELS; - ctx->block_align = bytestream2_get_le32(&gbc); + ctx->block_align = bytestream2_get_le32(&gbc) & 0x7FFFFFFF; ctx->codec_tag = bytestream2_get_le32(&gbc); keyframes = bytestream2_get_le64(&gbc); ctx->request_channel_layout = bytestream2_get_le64(&gbc); |