summaryrefslogtreecommitdiff
path: root/fs/cifs/cifspdu.h
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2021-07-02 01:46:23 +0300
committerSteve French <stfrench@microsoft.com>2021-07-03 02:36:23 +0300
commit819f916c835d0d022117ad97cb3a658546352ab8 (patch)
tree1ecf625c949cd8f461dc73811a7f93a9cc276a3e /fs/cifs/cifspdu.h
parent01cf30825c8729884090151ab97f1c9c5d14a8bc (diff)
downloadlinux-819f916c835d0d022117ad97cb3a658546352ab8.tar.xz
cifs: clarify SMB1 code for UnixCreateHardLink
Coverity 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). This doesn't change the address but makes it slightly clearer. Addresses-Coverity: 711529 ("Out of bounds read") Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/cifspdu.h')
-rw-r--r--fs/cifs/cifspdu.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h
index 0923f72d27e9..f6e235001358 100644
--- a/fs/cifs/cifspdu.h
+++ b/fs/cifs/cifspdu.h
@@ -1785,6 +1785,7 @@ struct smb_com_transaction2_sfi_req {
__u16 Fid;
__le16 InformationLevel;
__u16 Reserved4;
+ __u8 payload[];
} __attribute__((packed));
struct smb_com_transaction2_sfi_rsp {