[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221004142306.ysgh45nhgdo4z3ok@suse.de>
Date: Tue, 4 Oct 2022 11:23:06 -0300
From: Enzo Matsumiya <ematsumiya@...e.de>
To: Muhammad Usama Anjum <usama.anjum@...labora.com>
Cc: Steve French <sfrench@...ba.org>, Paulo Alcantara <pc@....nz>,
Ronnie Sahlberg <lsahlber@...hat.com>,
Shyam Prasad N <sprasad@...rosoft.com>,
Tom Talpey <tom@...pey.com>, kernel@...labora.com,
kernel-janitors@...r.kernel.org, linux-cifs@...r.kernel.org,
samba-technical@...ts.samba.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] cifs: remove initialization value
Hi Usama,
On 10/04, Muhammad Usama Anjum wrote:
>Don't initialize the rc as its value is being overwritten before its
>use.
Being bitten by an unitialized variable bug as recent as 2 days ago, I'd
say this is a step backwards from the "best practices" POV.
>Signed-off-by: Muhammad Usama Anjum <usama.anjum@...labora.com>
>---
> fs/cifs/smb2pdu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
>index 0600f0a07628..2bf43c892ae6 100644
>--- a/fs/cifs/smb2pdu.c
>+++ b/fs/cifs/smb2pdu.c
>@@ -879,7 +879,7 @@ SMB2_negotiate(const unsigned int xid,
> struct smb2_negotiate_rsp *rsp;
> struct kvec iov[1];
> struct kvec rsp_iov;
>- int rc = 0;
>+ int rc;
> int resp_buftype;
> int blob_offset, blob_length;
> char *security_blob;
>--
>2.30.2
Cheers,
Enzo
Powered by blists - more mailing lists