summaryrefslogtreecommitdiff
path: root/fs/cifs/misc.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <lsahlber@redhat.com>2018-04-23 00:30:12 +0300
committerSteve French <stfrench@microsoft.com>2018-05-28 01:56:35 +0300
commit9ec672bd17131fe26c966960a573a76fdb1da323 (patch)
tree92fe6dc479fbaca3f2e260a3a5bf6f5b1f750382 /fs/cifs/misc.c
parent14547f7d74c4a2583214693f69d45374b8028649 (diff)
downloadlinux-9ec672bd17131fe26c966960a573a76fdb1da323.tar.xz
cifs: update calc_size to take a server argument
and change the smb2 version to take heder_preamble_size into account instead of hardcoding it as 4 bytes. Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/misc.c')
-rw-r--r--fs/cifs/misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index 247a59774b7f..96849b530e32 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -342,7 +342,7 @@ checkSMB(char *buf, unsigned int total_read, struct TCP_Server_Info *server)
/* otherwise, there is enough to get to the BCC */
if (check_smb_hdr(smb))
return -EIO;
- clc_len = smbCalcSize(smb);
+ clc_len = smbCalcSize(smb, server);
if (4 + rfclen != total_read) {
cifs_dbg(VFS, "Length read does not match RFC1001 length %d\n",