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 5A6BC4A5FE for ; Thu, 2 May 2024 21:41:11 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7EFEF68D873; Fri, 3 May 2024 00:41:09 +0300 (EEST) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id ABDFF68D7F7 for ; Fri, 3 May 2024 00:41:02 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 05CD320007 for ; Thu, 2 May 2024 21:41:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1714686062; 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=AINDuIUqtZxQsMJNI+fYcdR0v6X8R6iFYB+62w/ko9o=; b=OqVTUuyEz6H2YQHbXiEGdce60iO9v84D+AtJ1zf6G1lVAOSxcdInB99yhQdGqXE7awbupM 2tmJ6dv7b8M+hIyXsW7jXwlMKC39DUB0gnCaPY/vZ+blegI75hNLzHHIoBIYEmJBoA0fjf xZd7BGGkLEgevoGkbGuoW7kyNxd8BzWaA0DBwCN9qxScivAzvCZ2FkPALdNHnbOgu8Xv2G VgrYvrjxAfnL2l/BCDaZmEbFUx3uPjrY8NfK28wolu3c1tM5SpXm3fKgdgSl0mYfBbxszN 65j/9CcNMhivCVbYUn3bv9kTY8xPUjWJ3seDF8St2mRfDEAdsMASL8tT0vxgCA== Date: Thu, 2 May 2024 23:41:01 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240502214101.GG6420@pb2> References: <20240502004150.3627661-1-michael@niedermayer.cc> <20240502004150.3627661-2-michael@niedermayer.cc> <20240502212939.GE6420@pb2> MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 2/7] avcodec/av1dec: initialize ret in av1_receive_frame_internal() 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="===============0947188771965540789==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============0947188771965540789== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="bKL3N53NpIlOb/du" Content-Disposition: inline --bKL3N53NpIlOb/du Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 02, 2024 at 11:34:48PM +0200, Andreas Rheinhardt wrote: > Michael Niedermayer: > > On Thu, May 02, 2024 at 09:12:36AM +0200, Andreas Rheinhardt wrote: > >> Michael Niedermayer: > >>> Fixes: CID1596605 Uninitialized scalar variable > >>> > >>> Sponsored-by: Sovereign Tech Fund > >>> Signed-off-by: Michael Niedermayer > >>> --- > >>> libavcodec/av1dec.c | 2 +- > >>> 1 file changed, 1 insertion(+), 1 deletion(-) > >>> > >>> diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c > >>> index 4f9222cca27..93ab04eb378 100644 > >>> --- a/libavcodec/av1dec.c > >>> +++ b/libavcodec/av1dec.c > >>> @@ -1262,7 +1262,7 @@ static int av1_receive_frame_internal(AVCodecCo= ntext *avctx, AVFrame *frame) > >>> { > >>> AV1DecContext *s =3D avctx->priv_data; > >>> AV1RawTileGroup *raw_tile_group =3D NULL; > >>> - int i =3D 0, ret; > >>> + int i =3D 0, ret =3D 0; > >>> =20 > >>> for (i =3D s->nb_unit; i < s->current_obu.nb_units; i++) { > >>> CodedBitstreamUnit *unit =3D &s->current_obu.units[i]; > >> > >> A better approach is to actually initialize ret before every goto end = in > >> order to ensure that only the actually desired ret is returned and not > >> some earlier value. > >=20 > > ok, will apply with ret =3D 0 before the 2 goto end lacking it that i s= ee > >=20 >=20 > I already sent a patch for this. ok, ill drop mine then thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The bravest are surely those who have the clearest vision of what is before them, glory and danger alike, and yet notwithstanding go out to meet it. -- Thucydides --bKL3N53NpIlOb/du Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZjQIbQAKCRBhHseHBAsP q2jkAJ9weR/wIEs6s06mwJUtGj0rNzMtWwCfRtmdLTgp5nEHID9WYtUmgPrtu8A= =955H -----END PGP SIGNATURE----- --bKL3N53NpIlOb/du-- --===============0947188771965540789== 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". --===============0947188771965540789==--