Commit c73f6939 authored by Jeff Layton's avatar Jeff Layton Committed by Steve French

cifs: fix return value in cifsConvertToUTF16

This function returns the wrong value, which causes the callers to get
the length of the resulting pathname wrong when it contains non-ASCII
characters.

This seems to fix https://bugzilla.samba.org/show_bug.cgi?id=6767

Cc: <stable@vger.kernel.org>
Reported-by: default avatarBaldvin Kovacs <baldvin.kovacs@gmail.com>
Reported-and-Tested-by: default avatarNicolas Lefebvre <nico.lefebvre@gmail.com>
Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
Signed-off-by: default avatarSteve French <smfrench@gmail.com>
parent 4651afbb
...@@ -328,7 +328,7 @@ cifsConvertToUTF16(__le16 *target, const char *source, int srclen, ...@@ -328,7 +328,7 @@ cifsConvertToUTF16(__le16 *target, const char *source, int srclen,
} }
ctoUTF16_out: ctoUTF16_out:
return i; return j;
} }
#ifdef CONFIG_CIFS_SMB2 #ifdef CONFIG_CIFS_SMB2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment