diff options
-rw-r--r-- | fs/cifs/sess.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c index 2e2c91103529..645114ad0a10 100644 --- a/fs/cifs/sess.c +++ b/fs/cifs/sess.c | |||
@@ -916,7 +916,9 @@ ssetup_ntlmssp_authenticate: | |||
916 | } | 916 | } |
917 | 917 | ||
918 | /* BB check if Unicode and decode strings */ | 918 | /* BB check if Unicode and decode strings */ |
919 | if (smb_buf->Flags2 & SMBFLG2_UNICODE) { | 919 | if (bytes_remaining == 0) { |
920 | /* no string area to decode, do nothing */ | ||
921 | } else if (smb_buf->Flags2 & SMBFLG2_UNICODE) { | ||
920 | /* unicode string area must be word-aligned */ | 922 | /* unicode string area must be word-aligned */ |
921 | if (((unsigned long) bcc_ptr - (unsigned long) smb_buf) % 2) { | 923 | if (((unsigned long) bcc_ptr - (unsigned long) smb_buf) % 2) { |
922 | ++bcc_ptr; | 924 | ++bcc_ptr; |