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 795C64B28F for ; Sun, 2 Jun 2024 20:28:06 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 550CA68D627; Sun, 2 Jun 2024 23:28:04 +0300 (EEST) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E238D68D4A8 for ; Sun, 2 Jun 2024 23:27:57 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id D6FD2240002 for ; Sun, 2 Jun 2024 20:27:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1717360077; 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=xWXig8iGKu5HBlJTiY/xj+ro7B52qNpkAgFGLay2DvM=; b=TBVa9vGpCR6OrfnmTDpglNykBaxzhIGJGXhq5OALVnigagbBlqw2TKH5nQJKQGKRtJusLe IjQ/ocEh5nkVHeWnZrwOVC8graQKjwqIAeVPeVVWNzJDwcp7eZEcSSJvg27toIWiD1A+gC VEB77It0a3QR7s6lKTQYgqMCQTTqvT+p1fbnoCyVUdb17lzsfwBKfEqA27EBtaX/yhlmma vNsHBVJ9OOV6pB2ceycj9j1XyVa5X2AfGmPRFMHLwL7i/mYt8JZPm1l/39oHxTM/d1qEkF e5+EfqRmrW/Lb2JQscLmfYmuf2cNt5RScyuyzHSGAzgWP3oOkzXgMdjmcxCSXQ== Date: Sun, 2 Jun 2024 22:27:55 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240602202755.GA2821752@pb2> References: <20240526235230.2876318-1-michael@niedermayer.cc> <20240526235230.2876318-4-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 04/17] avcodec/dxva2: initialize hr in ff_dxva2_common_end_frame() 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="===============5356810805412740260==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============5356810805412740260== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="BSSbv0ryU43/w77f" Content-Disposition: inline --BSSbv0ryU43/w77f Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jun 02, 2024 at 09:10:33PM +0200, Andreas Rheinhardt wrote: > Michael Niedermayer: > > Fixes: CID1591924 Uninitialized scalar variable > > Fixes: CID1591938 Uninitialized scalar variable > >=20 > > Sponsored-by: Sovereign Tech Fund > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/dxva2.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > >=20 > > diff --git a/libavcodec/dxva2.c b/libavcodec/dxva2.c > > index 1a33c8bbac7..22ecd5acafe 100644 > > --- a/libavcodec/dxva2.c > > +++ b/libavcodec/dxva2.c > > @@ -906,7 +906,7 @@ int ff_dxva2_common_end_frame(AVCodecContext *avctx= , AVFrame *frame, > > #endif > > DECODER_BUFFER_DESC *buffer =3D NULL, *buffer_slice = =3D NULL; > > int result, runs =3D 0; > > - HRESULT hr; > > + HRESULT hr =3D -1; > > unsigned type; > > FFDXVASharedContext *sctx =3D DXVA_SHARED_CONTEXT(avctx); > > =20 >=20 > It seems to me that this (and other patches in this set) is not a real > fix of a bug. These functions are called either with a D3D11 pix fmt or > with AV_PIX_FMT_DXVA2_VLD, so these variables are initialized before > their use. If they are called with another pixel format then its exploitable maybe that cannot happen currently But if or if not. Initializing these variables makes the code simply more robust and also if it happens a NULL is easier to debug than uninitialized variables. The assumtions that need to be true for them to be initialized are not entirely trivial. ill drop the patches from what i wanted to apply currently but i still think they should be applied. I can change the commit message if you can suggest something else ? thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Many that live deserve death. And some that die deserve life. Can you give it to them? Then do not be too eager to deal out death in judgement. For even the very wise cannot see all ends. -- Gandalf --BSSbv0ryU43/w77f Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZlzVyAAKCRBhHseHBAsP q2q8AJ92ftVEojbmpSmusZBmmdI3TL5ygwCcC7iANoH3q6zqWrtxdwxnOfEUjAc= =ocVh -----END PGP SIGNATURE----- --BSSbv0ryU43/w77f-- --===============5356810805412740260== 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". --===============5356810805412740260==--