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 6839B4AC90 for ; Sun, 19 May 2024 03:18:32 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 74A7F68D2A4; Sun, 19 May 2024 06:18:29 +0300 (EEST) Received: from mx.sdf.org (mx.sdf.org [205.166.94.24]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4D51A68C1B3 for ; Sun, 19 May 2024 06:18:22 +0300 (EEST) Received: from fa7e0802a724d30006d4dce511c573ba ([1.136.193.40]) (authenticated (0 bits)) by mx.sdf.org (8.16.1/8.14.3) with ESMTPSA id 44J3IFVa028545 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO) for ; Sun, 19 May 2024 03:18:19 GMT Date: Sun, 19 May 2024 13:18:09 +1000 From: Peter Ross To: FFmpeg development discussions and patches Message-ID: Mail-Followup-To: FFmpeg development discussions and patches References: <20240519024915.1944150-1-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: <20240519024915.1944150-1-michael@niedermayer.cc> Subject: Re: [FFmpeg-devel] [PATCH 1/9] avcodec/vqcdec: Check init_get_bits8() for failure 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="===============3629406331773121320==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============3629406331773121320== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9mGnhOwRG3C/IIRg" Content-Disposition: inline --9mGnhOwRG3C/IIRg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 19, 2024 at 04:49:07AM +0200, Michael Niedermayer wrote: > Fixes: CID1516090 Unchecked return value >=20 > Sponsored-by: Sovereign Tech Fund > Signed-off-by: Michael Niedermayer > --- > libavcodec/vqcdec.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) >=20 > diff --git a/libavcodec/vqcdec.c b/libavcodec/vqcdec.c > index 5c6cab3c1ab..bb69844327d 100644 > --- a/libavcodec/vqcdec.c > +++ b/libavcodec/vqcdec.c > @@ -147,10 +147,13 @@ static int decode_vectors(VqcContext * s, const uin= t8_t * buf, int size, int wid > GetBitContext gb; > uint8_t * vectors =3D s->vectors; > uint8_t * vectors_end =3D s->vectors + (width * height * 3) / 2; > + int ret; > =20 > memset(vectors, 0, 3 * width * height / 2); > =20 > - init_get_bits8(&gb, buf, size); > + ret =3D init_get_bits8(&gb, buf, size); > + if (ret < 0) > + return ret; > =20 > for (int i =3D 0; i < 3 * width * height / 2 / 32; i++) { > uint8_t * dst =3D vectors; ok -- Peter (A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B) --9mGnhOwRG3C/IIRg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQSpB+AvpuUM0jTNINJnYHnFrEDdawUCZklvaQAKCRBnYHnFrEDd a8VNAJ0WOqyAkEx3x44UrNH+FvMpAm0pjwCeJGXrhTKoujSwUPB7juGSAyKDrrs= =ALMX -----END PGP SIGNATURE----- --9mGnhOwRG3C/IIRg-- --===============3629406331773121320== 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". --===============3629406331773121320==--