summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-12-17 18:40:53 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-12-19 19:59:06 +0100
commit99af260d0b07aad075ce1a4a8d71aa65e460a4c2 (patch)
tree085642c9debf3b2778ac1c5bf188bc4500fbc320 /doc
parent02aa0701ae0dc2def8db640c9e3c06dc1b5de70c (diff)
doc/examples/decoder_targeted: Limit max pixels for fuzzing
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/decoder_targeted.c3
1 files changed, 3 insertions, 0 deletions
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;