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 60B3644F0F for ; Thu, 8 Dec 2022 16:19:31 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9783C68BB0D; Thu, 8 Dec 2022 18:19:29 +0200 (EET) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 179E968A073 for ; Thu, 8 Dec 2022 18:19:23 +0200 (EET) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 15F2F1BF20F for ; Thu, 8 Dec 2022 16:19:21 +0000 (UTC) Date: Thu, 8 Dec 2022 17:19:21 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20221208161921.GD3806951@pb2> References: <20221127223435.8362-1-michael@niedermayer.cc> <20221127223435.8362-2-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 2/3] avcodec/vqcdec: Check width & 15 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="===============2694639575608183944==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============2694639575608183944== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Y46ssxGX9/CNNfN6" Content-Disposition: inline --Y46ssxGX9/CNNfN6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 08, 2022 at 06:32:40PM +1100, Peter Ross wrote: > On Sun, Nov 27, 2022 at 11:34:34PM +0100, Michael Niedermayer wrote: > > Various parts of the code assume that width can be divided by various p= owers of 2 > > without rounding > >=20 > > Fixes: out of array access > > Fixes: 53623/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VQC_fuzz= er-6209269924233216 > >=20 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz= /tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/vqcdec.c | 3 +++ > > 1 file changed, 3 insertions(+) > >=20 > > diff --git a/libavcodec/vqcdec.c b/libavcodec/vqcdec.c > > index 18cd99462e..c3bce87974 100644 > > --- a/libavcodec/vqcdec.c > > +++ b/libavcodec/vqcdec.c > > @@ -71,6 +71,9 @@ static av_cold int vqc_decode_init(AVCodecContext * a= vctx) > > static AVOnce init_static_once =3D AV_ONCE_INIT; > > VqcContext *s =3D avctx->priv_data; > > =20 > > + if (avctx->width & 15) > > + return AVERROR_PATCHWELCOME; > > + > > s->vectors =3D av_malloc((avctx->width * avctx->height * 3) / 2); > > if (!s->vectors) > > return AVERROR(ENOMEM); > > --=20 > > 2.17.1 >=20 > ok. please apply. will apply thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Complexity theory is the science of finding the exact solution to an approximation. Benchmarking OTOH is finding an approximation of the exact --Y46ssxGX9/CNNfN6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCY5IOggAKCRBhHseHBAsP q4YVAJ9qbyI9E0zoCVtUd0U+wlncWg8XjwCfT12afOpueAs2VPaGD6pkykVJsVg= =5lEk -----END PGP SIGNATURE----- --Y46ssxGX9/CNNfN6-- --===============2694639575608183944== 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". --===============2694639575608183944==--