From patchwork Sun Jan 8 12:59:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 39924 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:bc95:b0:ad:ade2:bfd2 with SMTP id fx21csp2423720pzb; Sun, 8 Jan 2023 04:59:57 -0800 (PST) X-Google-Smtp-Source: AMrXdXseOSKR0FhqudpnTWtQGTQLh6Gh2skOLddrZpAAyLLHRfB/vWTm2fOs63ZjzlDWi3sB9AVp X-Received: by 2002:a17:906:4d58:b0:7c4:fa17:7204 with SMTP id b24-20020a1709064d5800b007c4fa177204mr51008242ejv.7.1673182797185; Sun, 08 Jan 2023 04:59:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673182797; cv=none; d=google.com; s=arc-20160816; b=kwat9TX4166Kh0YvNDjz3cqob2pk/YlKYehPNQ2MbmvoWDpvd0Q15SHe/EpCjQHLPD 4qKnvTNCVQi+ONpVKQnnee5NJea8ETrUXY4TDaIFypWoIz8M6e7aJk7Pit1rFvYeSBDa 3HMMlxrM38K83useR9+bhD+0Fzy5rEcCRwwRP51rVJswrU6KGgtEK1VcuM70QJrGrk3O toWq1DDHijZsyOKG6jlGMFsxL8BZZeRwEA1tYwbhMSFkSQYB1UsutHF7pqa+K5c4zGFF 8E9vVEyemZfO109/+8svaji6kO0jFJ+F/Kxz2kVdBo/0CvxY6zKm8PKhOp2Edsu7P6bY KLwg== 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; bh=pdVLd63NH0TAjmHdJeNHgRWHroRvhHMITw44iJY8yWM=; b=my7h9KVzJeYzkzdIk6eJ8qzy2vnuMkBSc99RlvOhyTy8xSi0fY4jOZXy1D0S9cgY98 uHM4AxrhjgdXzagxmLATsZpAmra3MkEqqIi3o5AMv7PiE6ZBslkAFg7Fske8MUX7wzE4 rijVz8XcNGkBSmkjoMjk2z01ys6IegVHD07N1/xbskBcUrZVhTHLdkPRXLW6KagBtqvE +KEc22a8IPyG0NGZmvVsZVAcziRVsCn1/od3fnH2KIpJfxyJRVrJCwj6r1ph1Fn41RGl 1qPuLzhscpVtBK9dec3otbSUATW5NWW5nxzGPlNjsO5+xsE1/2mGqzMlnsp/gSBmJ49T Po4A== 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 ji7-20020a170907980700b0084d33d87c45si4448315ejc.751.2023.01.08.04.59.56; Sun, 08 Jan 2023 04:59:57 -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 E115768BCAF; Sun, 8 Jan 2023 14:59:12 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 68A3268BB9A for ; Sun, 8 Jan 2023 14:59:09 +0200 (EET) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 00CA320009 for ; Sun, 8 Jan 2023 12:59:08 +0000 (UTC) From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 8 Jan 2023 13:59:08 +0100 Message-Id: <20230108125908.22868-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 Subject: [FFmpeg-devel] [PATCH] tools/target_dec_fuzzer: Test lowres X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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" X-TUID: WzdyjwbRC52s Signed-off-by: Michael Niedermayer --- tools/target_dec_fuzzer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index a20345db5c..1725e30a5a 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -423,6 +423,10 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { ctx->workaround_bugs = bytestream2_get_le32(&gbc); + if (c->p.max_lowres) { + ctx->lowres = bytestream2_get_byte(&gbc) % (c->p.max_lowres+1); + } + if (extradata_size < size) { ctx->extradata = av_mallocz(extradata_size + AV_INPUT_BUFFER_PADDING_SIZE); if (ctx->extradata) {