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 7738844F03 for ; Thu, 8 Dec 2022 07:33:05 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7AA5468B88C; Thu, 8 Dec 2022 09:33:02 +0200 (EET) Received: from mx.sdf.org (mx.sdf.org [205.166.94.24]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C93E468AF62 for ; Thu, 8 Dec 2022 09:32:55 +0200 (EET) Received: from 4eb231a0d1b36cedda43a2a005befe4d ([1.145.149.225]) (authenticated (0 bits)) by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id 2B87WiNP012915 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO) for ; Thu, 8 Dec 2022 07:32:48 GMT Date: Thu, 8 Dec 2022 18:32:40 +1100 From: Peter Ross To: FFmpeg development discussions and patches Message-ID: Mail-Followup-To: FFmpeg development discussions and patches References: <20221127223435.8362-1-michael@niedermayer.cc> <20221127223435.8362-2-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: <20221127223435.8362-2-michael@niedermayer.cc> 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="===============7206388197630849440==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============7206388197630849440== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1F13HfRlZRedzCuB" Content-Disposition: inline --1F13HfRlZRedzCuB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 pow= ers of 2 > without rounding >=20 > Fixes: out of array access > Fixes: 53623/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VQC_fuzzer= -6209269924233216 >=20 > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/t= ree/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 * avc= tx) > 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 ok. please apply. -- Peter (A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B) --1F13HfRlZRedzCuB Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQSpB+AvpuUM0jTNINJnYHnFrEDdawUCY5GTFQAKCRBnYHnFrEDd az4KAKCRy6nYtFwcpCNr7/8pj7/mvLIzoACfUVd6RCYl/tUwQWJbuIVf+/HAC28= =Z1Zh -----END PGP SIGNATURE----- --1F13HfRlZRedzCuB-- --===============7206388197630849440== 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". --===============7206388197630849440==--