[FFmpeg-cvslog] doc/examples/decoder_targeted: Limit max pixels for fuzzing

Michael Niedermayer git at videolan.org
Mon Dec 19 20:59:38 EET 2016


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Dec 17 18:40:53 2016 +0100| [99af260d0b07aad075ce1a4a8d71aa65e460a4c2] | committer: Michael Niedermayer

doc/examples/decoder_targeted: Limit max pixels for fuzzing

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=99af260d0b07aad075ce1a4a8d71aa65e460a4c2
---

 doc/examples/decoder_targeted.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/doc/examples/decoder_targeted.c b/doc/examples/decoder_targeted.c
index f254f60..e7e02b0 100644
--- a/doc/examples/decoder_targeted.c
+++ b/doc/examples/decoder_targeted.c
@@ -147,6 +147,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
     AVCodecContext* ctx = avcodec_alloc_context3(NULL);
     if (!ctx)
         error("Failed memory allocation");
+
+    ctx->max_pixels = 4096 * 4096; //To reduce false positive OOM and hangs
+
     int res = avcodec_open2(ctx, c, NULL);
     if (res < 0)
         return res;



More information about the ffmpeg-cvslog mailing list