aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/sess.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/sess.c')
-rw-r--r--fs/cifs/sess.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index b6ff84af81a4..1daadade4d3c 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -621,7 +621,7 @@ ssetup_ntlmssp_authenticate:
621 and rest of bcc area. This allows us to avoid 621 and rest of bcc area. This allows us to avoid
622 a large buffer 17K allocation */ 622 a large buffer 17K allocation */
623 iov[0].iov_base = (char *)pSMB; 623 iov[0].iov_base = (char *)pSMB;
624 iov[0].iov_len = smb_buf->smb_buf_length + 4; 624 iov[0].iov_len = be32_to_cpu(smb_buf->smb_buf_length) + 4;
625 625
626 /* setting this here allows the code at the end of the function 626 /* setting this here allows the code at the end of the function
627 to free the request buffer if there's an error */ 627 to free the request buffer if there's an error */
@@ -859,7 +859,8 @@ ssetup_ntlmssp_authenticate:
859 iov[2].iov_len = (long) bcc_ptr - (long) str_area; 859 iov[2].iov_len = (long) bcc_ptr - (long) str_area;
860 860
861 count = iov[1].iov_len + iov[2].iov_len; 861 count = iov[1].iov_len + iov[2].iov_len;
862 smb_buf->smb_buf_length += count; 862 smb_buf->smb_buf_length =
863 cpu_to_be32(be32_to_cpu(smb_buf->smb_buf_length) + count);
863 864
864 put_bcc_le(count, smb_buf); 865 put_bcc_le(count, smb_buf);
865 866