Skip to content

Commit 7de975e

Browse files
Namjae Jeonsmfrench
authored andcommitted
cifs: fix a possible use of uninit variable in SMB2_sess_setup
In case of error, goto ssetup_exit can be hit and we could end up using uninitialized value of resp_buftype Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Ashish Sangwan <a.sangwan@samsung.com> Signed-off-by: Steve French <smfrench@gmail.com>
1 parent d6ccf49 commit 7de975e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/cifs/smb2pdu.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ SMB2_sess_setup(const unsigned int xid, struct cifs_ses *ses,
530530
struct smb2_sess_setup_rsp *rsp = NULL;
531531
struct kvec iov[2];
532532
int rc = 0;
533-
int resp_buftype;
533+
int resp_buftype = CIFS_NO_BUFFER;
534534
__le32 phase = NtLmNegotiate; /* NTLMSSP, if needed, is multistage */
535535
struct TCP_Server_Info *server = ses->server;
536536
u16 blob_length = 0;

0 commit comments

Comments
 (0)