mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 02:17:36 -04:00
smb/client: zero-initialize stack-allocated cifs_open_info_data
Stack-allocated cifs_open_info_data may contain random data. This can make some fields have wrong value if they are not set later. Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
committed by
Steve French
parent
1f551e407b
commit
8fce4cf436
@@ -234,7 +234,7 @@ cifs_query_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,
|
||||
struct cifs_open_parms oparms;
|
||||
struct cifs_io_parms io_parms = {0};
|
||||
int buf_type = CIFS_NO_BUFFER;
|
||||
struct cifs_open_info_data query_data;
|
||||
struct cifs_open_info_data query_data = {};
|
||||
|
||||
oparms = (struct cifs_open_parms) {
|
||||
.tcon = tcon,
|
||||
|
||||
@@ -949,7 +949,7 @@ smb_set_file_info(struct inode *inode, const char *full_path,
|
||||
struct cifs_open_parms oparms;
|
||||
struct cifsFileInfo *open_file;
|
||||
FILE_BASIC_INFO new_buf;
|
||||
struct cifs_open_info_data query_data;
|
||||
struct cifs_open_info_data query_data = {};
|
||||
__le64 write_time = buf->LastWriteTime;
|
||||
struct cifsInodeInfo *cinode = CIFS_I(inode);
|
||||
struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
|
||||
|
||||
@@ -5237,7 +5237,7 @@ int __cifs_sfu_make_node(unsigned int xid, struct inode *inode,
|
||||
{
|
||||
struct TCP_Server_Info *server = tcon->ses->server;
|
||||
struct cifs_open_parms oparms;
|
||||
struct cifs_open_info_data idata;
|
||||
struct cifs_open_info_data idata = {};
|
||||
struct cifs_io_parms io_parms = {};
|
||||
struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
|
||||
struct cifs_fid fid;
|
||||
|
||||
Reference in New Issue
Block a user