]> git.baikalelectronics.ru Git - kernel.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)
commitc528e482a01f7ef3808cff4d55ffb62a40519fa7
tree3128353a613e1b3a708757ca6ad8ea3b1f275bed
parentb51b9e5c2581d388cd19106cca0ff6412344c7d4
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