]> git.ipfire.org Git - thirdparty/linux.git/commit
CIFS: Clarify SMB1 code for SetFileSize
authorSteve French <stfrench@microsoft.com>
Wed, 7 Jul 2021 02:27:26 +0000 (21:27 -0500)
committerSteve French <stfrench@microsoft.com>
Wed, 7 Jul 2021 16:52:53 +0000 (11:52 -0500)
commite3973ea3a7c218c1e92bdbfe1da934ef69d7a4ed
tree3128353a613e1b3a708757ca6ad8ea3b1f275bed
parent90810c25cf028bbd7e8abd9903c37610ef7072c7
CIFS: Clarify SMB1 code for SetFileSize

Coverity also complains about the way we calculate the offset
(starting from the address of a 4 byte array within the header
structure rather than from the beginning of the struct plus
4 bytes) for setting the file size using SMB1. This changeset
doesn't change the address but makes it slightly clearer.

Addresses-Coverity: 711525 ("Out of bounds write")
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifssmb.c