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 DCA594886C for ; Sun, 19 May 2024 19:39:33 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 57A9268D02A; Sun, 19 May 2024 22:39:32 +0300 (EEST) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4093368AC40 for ; Sun, 19 May 2024 22:39:25 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id A4A5A40002 for ; Sun, 19 May 2024 19:39:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1716147563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xvr1V/KGmO12whp290hxbK2QJK/FtdXD8VEzQe3zVxw=; b=ZtGnKmkRhkVsGOtjm/zD7Ohx981VldOh6cp99P0DXNTnjFbPIzf3OPu1xBk+WpYAWfsoVT Jwk9XK+rHqVUZd5wbYiyrdPq8m2hjQH2NQ7rC3wz1VISef3x8NPb7wcX/vhxyD2oo0xCzA wtjNfDUIsYaDKvyxq9F103R8DvubLf/jIqpLne/zdARg8ueYtlP84WU4i53XDNp7xSUFLz q+fXLs7KaNOdMe+Cal2AbNQQ5LCYtnkQ9zakq50RGvOjZMcyCJuXYF/y9y9qIcaA6kLuQr inAj1zvlvY4PhFw7nr+BjPtCbGRzX3c4bhtL2l45jBC+nb1jT1j69cR+AubY/Q== Date: Sun, 19 May 2024 21:39:22 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240519193922.GI2821752@pb2> References: <20240519024915.1944150-1-michael@niedermayer.cc> <20240519024915.1944150-6-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 6/9] avcodec/vvc/dec: 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="===============7449468709135043664==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============7449468709135043664== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="PMULwz+zIGJzpDN9" Content-Disposition: inline --PMULwz+zIGJzpDN9 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 19, 2024 at 10:31:50PM +0800, Nuo Mi wrote: > On Sun, May 19, 2024 at 10:50=E2=80=AFAM Michael Niedermayer > wrote: >=20 > > Fixes: CID1560042 Unchecked return value > > > > Sponsored-by: Sovereign Tech Fund > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/vvc/dec.c | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/libavcodec/vvc/dec.c b/libavcodec/vvc/dec.c > > index d262d310125..f2ede490c8b 100644 > > --- a/libavcodec/vvc/dec.c > > +++ b/libavcodec/vvc/dec.c > > @@ -514,6 +514,7 @@ static int slice_init_entry_points(SliceContext *sc, > > int nb_eps =3D sh->r->num_entry_points + 1; > > int ctu_addr =3D 0; > > GetBitContext gb; > > + int ret; > > > > if (sc->nb_eps !=3D nb_eps) { > > eps_free(sc); > > @@ -523,7 +524,9 @@ static int slice_init_entry_points(SliceContext *sc, > > sc->nb_eps =3D nb_eps; > > } > > > > - init_get_bits8(&gb, slice->data, slice->data_size); > > + ret =3D init_get_bits8(&gb, slice->data, slice->data_size); > > + if (ret < 0) > > + return ret; > > for (int i =3D 0; i < sc->nb_eps; i++) > > { > > EntryPoint *ep =3D sc->eps + i; > > > LGTM. > Thank you, Michael. will apply thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Everything should be made as simple as possible, but not simpler. -- Albert Einstein --PMULwz+zIGJzpDN9 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZkpVagAKCRBhHseHBAsP qwpLAKCU/8dUCXf+JG24E4xIZuQFH5ocbQCfWH0KQy3QMobR+QXHzPCXaL2deJk= =mya8 -----END PGP SIGNATURE----- --PMULwz+zIGJzpDN9-- --===============7449468709135043664== 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". --===============7449468709135043664==--