]> git.sesse.net Git - ffmpeg/commitdiff
tools/target_dec_fuzzer: consider potential padding/edge in pixel threshold
authorMichael Niedermayer <michael@niedermayer.cc>
Wed, 4 Sep 2019 12:24:48 +0000 (14:24 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Tue, 24 Sep 2019 15:53:39 +0000 (17:53 +0200)
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>
tools/target_dec_fuzzer.c

index 5c0a9db5c3e571826fc2478f34ed9dfe3c6cc75c..ba45b6ac056c5ed1881fa9e97dc8ce47b1280695 100644 (file)
@@ -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)