diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-09-04 14:24:48 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-09-24 17:53:39 +0200 |
commit | 59163731e992b113171d312110be8dd059b4f88a (patch) | |
tree | 35010e7dd46c0bb00443dbebed70e26f7c3d5d30 | |
parent | d217691eec5688e66d6962219d6764b82822ba63 (diff) | |
download | ffmpeg-59163731e992b113171d312110be8dd059b4f88a.tar.gz |
tools/target_dec_fuzzer: consider potential padding/edge in pixel threshold
Fixes: Timeout (73sec ->30ms)
Fixes: 16921/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5689384594046976
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | tools/target_dec_fuzzer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index 5c0a9db5c3..ba45b6ac05 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -259,7 +259,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { av_frame_unref(frame); int ret = decode_handler(ctx, frame, &got_frame, &avpkt); - ec_pixels += ctx->width * ctx->height; + ec_pixels += (ctx->width + 32LL) * (ctx->height + 32LL); if (it > 20 || ec_pixels > 4 * ctx->max_pixels) ctx->error_concealment = 0; if (ec_pixels > maxpixels) |