Commit d447e794 authored by Volker Lendecke's avatar Volker Lendecke Committed by Steve French
Browse files

cifs: Fix uninitialized memory read in smb3_qfs_tcon()



oparms was not fully initialized

Signed-off-by: default avatarVolker Lendecke <vl@samba.org>
Reviewed-by: default avatarPaulo Alcantara (SUSE) <pc@cjr.nz>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 3891f6c7
Loading
Loading
Loading
Loading
+7 −6
Original line number Original line Diff line number Diff line
@@ -729,12 +729,13 @@ smb3_qfs_tcon(const unsigned int xid, struct cifs_tcon *tcon,
	struct cifs_fid fid;
	struct cifs_fid fid;
	struct cached_fid *cfid = NULL;
	struct cached_fid *cfid = NULL;


	oparms.tcon = tcon;
	oparms = (struct cifs_open_parms) {
	oparms.desired_access = FILE_READ_ATTRIBUTES;
		.tcon = tcon,
	oparms.disposition = FILE_OPEN;
		.desired_access = FILE_READ_ATTRIBUTES,
	oparms.create_options = cifs_create_options(cifs_sb, 0);
		.disposition = FILE_OPEN,
	oparms.fid = &fid;
		.create_options = cifs_create_options(cifs_sb, 0),
	oparms.reconnect = false;
		.fid = &fid,
	};


	rc = open_cached_dir(xid, tcon, "", cifs_sb, false, &cfid);
	rc = open_cached_dir(xid, tcon, "", cifs_sb, false, &cfid);
	if (rc == 0)
	if (rc == 0)