cifs: replace a 4 with server->vals->header_preamble_size
authorRonnie Sahlberg <lsahlber@redhat.com>
Mon, 9 Apr 2018 08:06:27 +0000 (18:06 +1000)
committerSteve French <smfrench@gmail.com>
Thu, 12 Apr 2018 22:12:22 +0000 (17:12 -0500)
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
fs/cifs/smb2pdu.c

index e01be06d588ee1148109904cf057109bbddb6104..5cbdddcafaec68f61c35b251150137c0ce227036 100644 (file)
@@ -1131,7 +1131,7 @@ SMB2_sess_auth_rawntlmssp_negotiate(struct SMB2_sess_data *sess_data)
        if (rc)
                goto out;
 
-       if (offsetof(struct smb2_sess_setup_rsp, Buffer) - 4 !=
+       if (offsetof(struct smb2_sess_setup_rsp, Buffer) - ses->server->vals->header_preamble_size !=
                        le16_to_cpu(rsp->SecurityBufferOffset)) {
                cifs_dbg(VFS, "Invalid security buffer offset %d\n",
                        le16_to_cpu(rsp->SecurityBufferOffset));