summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-02-01 21:08:57 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2021-02-16 19:02:24 +0100
commitbe0c72b7c29324f42afd14f150eb9cdb83788ca0 (patch)
treea9b739ae99ed43d5f991b95c9a7575f9fa71d228 /tools
parent887bd6b02f6fbcc55a27dae31729efb0b769d5e0 (diff)
downloadffmpeg-be0c72b7c29324f42afd14f150eb9cdb83788ca0.tar.gz
tools/target_dec_fuzzer: Update maxpixels_per_frame for low thresholds
Fixes: Timeout Fixes: 29990/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MSS2_fuzzer-5469155073589248 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'tools')
-rw-r--r--tools/target_dec_fuzzer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c
index d4b9f419de..1977f1ab12 100644
--- a/tools/target_dec_fuzzer.c
+++ b/tools/target_dec_fuzzer.c
@@ -98,7 +98,7 @@ static int audio_video_handler(AVCodecContext *avctx, AVFrame *frame,
// Ensure we don't loop forever
const uint32_t maxiteration = 8096;
-const uint64_t maxpixels_per_frame = 4096 * 4096;
+uint64_t maxpixels_per_frame = 4096 * 4096;
uint64_t maxpixels;
uint64_t maxsamples_per_frame = 256*1024*32;
@@ -197,6 +197,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
}
maxsamples_per_frame = FFMIN(maxsamples_per_frame, maxsamples);
+ maxpixels_per_frame = FFMIN(maxpixels_per_frame , maxpixels);
AVCodecContext* ctx = avcodec_alloc_context3(c);
AVCodecContext* parser_avctx = avcodec_alloc_context3(NULL);