summaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2pdu.c
diff options
context:
space:
mode:
authorSteve French <smfrench@gmail.com>2018-04-13 03:32:13 +0200
committerSteve French <smfrench@gmail.com>2018-04-13 03:32:13 +0200
commit0d4b46ba7d124e67bcf27082bf313f8c07c93287 (patch)
tree50cd73b37e612d877433166bbb90cdb08c1dde75 /fs/cifs/smb2pdu.c
parentcifs: replace a 4 with server->vals->header_preamble_size (diff)
downloadlinux-0d4b46ba7d124e67bcf27082bf313f8c07c93287.tar.xz
linux-0d4b46ba7d124e67bcf27082bf313f8c07c93287.zip
smb3.11: replace a 4 with server->vals->header_preamble_size
More cleanup of use of hardcoded 4 byte RFC1001 field size Signed-off-by: Steve French <smfrench@gmail.com> Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com> Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Diffstat (limited to '')
-rw-r--r--fs/cifs/smb2pdu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index 5cbdddcafaec..be44c5c3e77e 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -474,7 +474,8 @@ static int smb311_decode_neg_context(struct smb2_negotiate_rsp *rsp,
if (len_of_ctxts < sizeof(struct smb2_neg_context))
break;
- pctx = (struct smb2_neg_context *)(offset + 4 + (char *)rsp);
+ pctx = (struct smb2_neg_context *)(offset +
+ server->vals->header_preamble_size + (char *)rsp);
clen = le16_to_cpu(pctx->DataLength);
if (clen > len_of_ctxts)
break;