From: Jeff Layton Date: Tue, 18 Sep 2012 18:21:01 +0000 (-0400) Subject: cifs: fix return value in cifsConvertToUTF16 X-Git-Tag: v3.5.5~150 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3e151dc53628c447f196e96808cf7b9eab17a027;p=karo-tx-linux.git cifs: fix return value in cifsConvertToUTF16 commit c73f693989d7a7d99ec66a7065295a0c93d0b127 upstream. 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 Reported-by: Baldvin Kovacs Reported-and-Tested-by: Nicolas Lefebvre Signed-off-by: Jeff Layton Signed-off-by: Steve French Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/cifs/cifs_unicode.c b/fs/cifs/cifs_unicode.c index fbb9da951843..33ef60d8e2fb 100644 --- a/fs/cifs/cifs_unicode.c +++ b/fs/cifs/cifs_unicode.c @@ -328,6 +328,6 @@ cifsConvertToUTF16(__le16 *target, const char *source, int srclen, } ctoUTF16_out: - return i; + return j; }