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

Michael Niedermayer michael at niedermayer.cc
Sat Dec 17 19:40:53 EET 2016


Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 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 f254f603ee..e7e02b027e 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;
-- 
2.11.0



More information about the ffmpeg-devel mailing list