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 6059B4A5E1 for ; Thu, 2 May 2024 21:29:54 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C276768D87A; Fri, 3 May 2024 00:29:47 +0300 (EEST) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1F93368D80D for ; Fri, 3 May 2024 00:29:41 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 72381C0005 for ; Thu, 2 May 2024 21:29:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1714685380; 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=C9HZ16KxNsYtAtnDN8eq/hQdihie4gtixgwChpj69Y0=; b=lf/Mz0UfPlQmV67AeifKWseCDsd/VuK892BpSoBjySfqUlQrRW9RyCGgMcy4YdNI4pzCvl 9/qcdmwQ5QMTkz1Fjdf3qE56bb9jz/tF9HeK/xo+m5aWp2OblqOL+vrqHUxZUn9VHt8wHg bdLGNUnj0ybKcZJARje8XK/UG0JxycXLjztLJgDFLhILpqDAJKiivgWeYrpLFOA11TY6vT haH8zxSE/v4PQ093IPIfYY0gGrvV24XuRX2lrDwTfqqeKFodfEj3r+AFeZn7nFRH6tKHRf XmTtNc9cgm8fZXnPcR2biNJzzxZF6DFR9Eki12epA5C/iyhc4/UhERmSKTm/9Q== Date: Thu, 2 May 2024 23:29:39 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240502212939.GE6420@pb2> References: <20240502004150.3627661-1-michael@niedermayer.cc> <20240502004150.3627661-2-michael@niedermayer.cc> 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="===============4899737925522249731==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============4899737925522249731== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gyMDBLSEtZtyi6yw" Content-Disposition: inline --gyMDBLSEtZtyi6yw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 02, 2024 at 09:12:36AM +0200, Andreas Rheinhardt wrote: > Michael Niedermayer: > > Fixes: CID1596605 Uninitialized scalar variable > >=20 > > Sponsored-by: Sovereign Tech Fund > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/av1dec.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > >=20 > > 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(AVCodecCont= ext *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]; >=20 > 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. ok, will apply with ret =3D 0 before the 2 goto end lacking it that i see thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The real ebay dictionary, page 1 "Used only once" - "Some unspecified defect prevented a second use" "In good condition" - "Can be repaird by experienced expert" "As is" - "You wouldnt want it even if you were payed for it, if you knew .= =2E." --gyMDBLSEtZtyi6yw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZjQFvQAKCRBhHseHBAsP q8S8AJ0QYSNcFNH//fQRGHNUyg/ubmEx5ACdEJWS6770R6HfGq6WpV7MUo+mHXY= =829i -----END PGP SIGNATURE----- --gyMDBLSEtZtyi6yw-- --===============4899737925522249731== 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". --===============4899737925522249731==--