]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
cifs: fix return value in cifsConvertToUTF16
authorJeff Layton <jlayton@redhat.com>
Tue, 18 Sep 2012 18:21:01 +0000 (14:21 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Oct 2012 17:39:22 +0000 (10:39 -0700)
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 <baldvin.kovacs@gmail.com>
Reported-and-Tested-by: Nicolas Lefebvre <nico.lefebvre@gmail.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/cifs_unicode.c

index fbb9da95184379bcec53499a7fcac55ff6078f17..33ef60d8e2fb50dbb996074b29fd563a1c1db82c 100644 (file)
@@ -328,6 +328,6 @@ cifsConvertToUTF16(__le16 *target, const char *source, int srclen,
        }
 
 ctoUTF16_out:
-       return i;
+       return j;
 }