diff options
author | Volker Lendecke <vl@samba.org> | 2023-01-11 12:37:58 +0100 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2023-02-20 11:48:48 -0600 |
commit | de036dcaca65cf94bf7ff09c571c077f02bc92b4 (patch) | |
tree | cf0ccb33f88531be01aa185c8fb5246f41d8c1b0 /fs/cifs/cifssmb.c | |
parent | 5574920c7a6b0ce7f3d0888ccf1efb9b7870b928 (diff) |
cifs: Fix uninitialized memory reads for oparms.mode
Use a struct assignment with implicit member initialization
Signed-off-by: Volker Lendecke <vl@samba.org>
Cc: stable@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r-- | fs/cifs/cifssmb.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 23f10e0d6e7e..8c014a3ff9e0 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c @@ -5372,14 +5372,15 @@ CIFSSMBSetPathInfoFB(const unsigned int xid, struct cifs_tcon *tcon, struct cifs_fid fid; int rc; - oparms.tcon = tcon; - oparms.cifs_sb = cifs_sb; - oparms.desired_access = GENERIC_WRITE; - oparms.create_options = cifs_create_options(cifs_sb, 0); - oparms.disposition = FILE_OPEN; - oparms.path = fileName; - oparms.fid = &fid; - oparms.reconnect = false; + oparms = (struct cifs_open_parms) { + .tcon = tcon, + .cifs_sb = cifs_sb, + .desired_access = GENERIC_WRITE, + .create_options = cifs_create_options(cifs_sb, 0), + .disposition = FILE_OPEN, + .path = fileName, + .fid = &fid, + }; rc = CIFS_open(xid, &oparms, &oplock, NULL); if (rc) |