From patchwork Mon Nov 20 17:25:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 6229 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.161.94 with SMTP id m30csp4185010jah; Mon, 20 Nov 2017 09:26:07 -0800 (PST) X-Google-Smtp-Source: AGs4zMaQKrKsrgRY1CX/WCorbCSMdcBuR0tP6HMV/CM2Zt7+sQDBmdPkX4Q8xyxvCKAzVWFwJ2Fc X-Received: by 10.28.59.69 with SMTP id i66mr11075695wma.130.1511198767350; Mon, 20 Nov 2017 09:26:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511198767; cv=none; d=google.com; s=arc-20160816; b=jagmIzXST8iOCZW/Bt1rIAJgSYB8iA8HzLcdqWtx4UgQMptYnsjWoi3tKnz5xrtara YX8FOBWVjqsCNTZousezvXHTaozQkvCvDbpER8vfrFkZz69RQzV38Ou58QFxOdFMhZSm YIr2NaBQjCjYZFyNAU3k0CRMaEFV43VfFFkTTbcY0Mynm4m481W4iuvchxN2swHO3mJJ gOYdLv8NyDAEgZbOeRue5jW4BeWUys8NcBGO9wHjfap6FioSOOyWzewq8pLmXTbC9k5g mgeSb/dV+LcWwJWSKJOGpK9cilX2J7zVgQrqRei4pktkXVOogfarEoTnAJpFCVFK6QFI KCRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:delivered-to :arc-authentication-results; bh=NeND+z1PH93n2wvoRmTzk+Bf1c2fcONEh+cDq1+O2Hg=; b=sDG7gs64vw6jta8HG116u2/cHrpXBEKTcbfR4DWQSe5coQuqrM/W/aKVIDF9kFbdnC oe+nQsHU+v6gE1YmMXsCR21e44VXhMDl4lzY7Zn48pwnFb23lZYbcOHE3qDS3hUiiDTL 9UvCUhQRR19EMFMKW+6R+IeTTM0c593fEyziw5w7S9zvu3BNe9gt6bheb9TYGNCwAo9z sDQuNxt6Zi8pF6gB8Yo3KtW+1ACWXIm1chkEagZTq1zLyJtve7n7YqehTO1FBBjitEUn FdnBi5wwFJQp/ksReuhxK4PaLJRlRxBfLNk3GuD3wG2djYI29ENdHZEtK/1WZFV5Opqa no/A== ARC-Authentication-Results: i=1; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id u38si8383492wrf.201.2017.11.20.09.26.06; Mon, 20 Nov 2017 09:26:07 -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 E790B689C20; Mon, 20 Nov 2017 19:25:47 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe08-2.mx.upcmail.net (vie01a-dmta-pe08-2.mx.upcmail.net [84.116.36.21]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 865A268972D for ; Mon, 20 Nov 2017 19:25:41 +0200 (EET) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe08.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1eGppW-0000cT-IS for ffmpeg-devel@ffmpeg.org; Mon, 20 Nov 2017 18:25:58 +0100 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id cHRr1w00k0S5wYM01HRs2o; Mon, 20 Nov 2017 18:25:52 +0100 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 20 Nov 2017 18:25:51 +0100 Message-Id: <20171120172551.7781-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.15.0 Subject: [FFmpeg-devel] [PATCH] tools/target_dec_fuzzer: Limit error concealment to max_pixels 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" Error concealment is time consuming, limiting it in a pixel dependant way allows the decoder to be fuzzed with more frames quicker Signed-off-by: Michael Niedermayer --- tools/target_dec_fuzzer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index 62d62a9de3..04f95561cc 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -211,7 +211,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { av_frame_unref(frame); int ret = decode_handler(ctx, frame, &got_frame, &avpkt); - if (it > 20) + if (it > 20 || it * ctx->width * ctx->height > ctx->max_pixels) ctx->error_concealment = 0; if (ret <= 0 || ret > avpkt.size)