[FFmpeg-devel,1/5] tools/target_dec_fuzzer: consider potential padding/edge in pixel threshold

Submitted by Michael Niedermayer on Sept. 4, 2019, 4:04 p.m.

Details

Message ID 20190904160458.28245-1-michael@niedermayer.cc
State Accepted
Commit 59163731e992b113171d312110be8dd059b4f88a
Headers show

Commit Message

Michael Niedermayer Sept. 4, 2019, 4:04 p.m.
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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer Sept. 24, 2019, 1:20 p.m.
On Wed, Sep 04, 2019 at 06:04:54PM +0200, Michael Niedermayer wrote:
> 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 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

will apply patchset

[...]

Patch hide | download patch | download mbox

diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c
index 3a19efd031..2d931cafd1 100644
--- a/tools/target_dec_fuzzer.c
+++ b/tools/target_dec_fuzzer.c
@@ -247,7 +247,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)