Skip to content

Commit

Permalink
cifsd: fix invalid memory access in smb2_write()
Browse files Browse the repository at this point in the history
Add missing fp initialzation to prevent invalid memory access in
smb2_write().

Reported-by: Coverity Scan <scan-admin@coverity.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
  • Loading branch information
namjaejeon authored and Steve French committed May 11, 2021
1 parent 5a0ca77 commit bcd62a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/cifsd/smb2pdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -6078,7 +6078,7 @@ int smb2_write(struct ksmbd_work *work)
{
struct smb2_write_req *req;
struct smb2_write_rsp *rsp, *rsp_org;
struct ksmbd_file *fp;
struct ksmbd_file *fp = NULL;
loff_t offset;
size_t length;
ssize_t nbytes;
Expand Down

0 comments on commit bcd62a3

Please sign in to comment.