From patchwork Sat Dec 17 17:40:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 1845 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.65.86 with SMTP id o83csp405756vsa; Sat, 17 Dec 2016 09:41:06 -0800 (PST) X-Received: by 10.28.105.194 with SMTP id z63mr7018185wmh.78.1481996466600; Sat, 17 Dec 2016 09:41:06 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id b81si8671270wmc.110.2016.12.17.09.41.05; Sat, 17 Dec 2016 09:41:06 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CC02B689D39; Sat, 17 Dec 2016 19:40:55 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe03-3.mx.upcmail.net (vie01a-dmta-pe03-3.mx.upcmail.net [62.179.121.162]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 70DEC689B43 for ; Sat, 17 Dec 2016 19:40:49 +0200 (EET) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe03.mx.upcmail.net with esmtp (Exim 4.87) (envelope-from ) id 1cIIyd-00028R-9z for ffmpeg-devel@ffmpeg.org; Sat, 17 Dec 2016 18:40:55 +0100 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id M5gu1u0050S5wYM015gveh; Sat, 17 Dec 2016 18:40:55 +0100 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 17 Dec 2016 18:40:53 +0100 Message-Id: <20161217174053.16282-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.11.0 Subject: [FFmpeg-devel] [PATCH] doc/examples/decoder_targeted: Limit max pixels for fuzzing X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Michael Niedermayer --- 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;