From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id B6CB2439B9 for ; Mon, 4 Jul 2022 15:45:10 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E009A68B7A4; Mon, 4 Jul 2022 18:45:06 +0300 (EEST) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DC25468B5AE for ; Mon, 4 Jul 2022 18:45:00 +0300 (EEST) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id E90C9C0008 for ; Mon, 4 Jul 2022 15:44:59 +0000 (UTC) Date: Mon, 4 Jul 2022 17:44:58 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220704154458.GI396728@pb2> References: <20220703003152.17850-1-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 1/6] avcodec/wnv1: Check for width =1 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 Content-Type: multipart/mixed; boundary="===============7535143287979576424==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============7535143287979576424== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="m2bTizTldMWlvlVy" Content-Disposition: inline --m2bTizTldMWlvlVy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 03, 2022 at 08:38:15AM +0200, Andreas Rheinhardt wrote: > Michael Niedermayer: > > The decoder only outputs pixels for width >1 images, fail early > >=20 > > Fixes: Timeout > > Fixes: 48298/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WNV1_fuz= zer-6198626319204352 > >=20 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz= /tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/wnv1.c | 3 +++ > > 1 file changed, 3 insertions(+) > >=20 > > diff --git a/libavcodec/wnv1.c b/libavcodec/wnv1.c > > index 0cf2181a48..f1223493fe 100644 > > --- a/libavcodec/wnv1.c > > +++ b/libavcodec/wnv1.c > > @@ -129,6 +129,9 @@ static av_cold int decode_init(AVCodecContext *avct= x) > > =20 > > ff_thread_once(&init_static_once, wnv1_init_static); > > =20 > > + if (avctx->width <=3D 1) > > + return AVERROR_INVALIDDATA; > > + > > return 0; > > } > > =20 >=20 > If you want to fail early, then why don't you do so before initializing > the static data? "early" in the sense of costly operations causing timeouts but=20 will apply with it moved up thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Frequently ignored answer#1 FFmpeg bugs should be sent to our bugtracker. U= ser questions about the command line tools should be sent to the ffmpeg-user ML. And questions about how to use libav* should be sent to the libav-user ML. --m2bTizTldMWlvlVy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYsMK9wAKCRBhHseHBAsP q/8fAKCanN1m3TedBmKztuZPFbrO4qFXuACeIGsK6SivC5fIxhZpsiO4D19Uxt4= =Dj0x -----END PGP SIGNATURE----- --m2bTizTldMWlvlVy-- --===============7535143287979576424== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". --===============7535143287979576424==--