summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifs_unicode.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2012-09-18 20:21:01 +0200
committerSteve French <smfrench@gmail.com>2012-09-18 22:35:25 +0200
commitc73f693989d7a7d99ec66a7065295a0c93d0b127 (patch)
tree4675ee9f6b92aefe53827c1d8a161a99326e20e4 /fs/cifs/cifs_unicode.c
parentMerge branch 'for-3.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff)
downloadlinux-c73f693989d7a7d99ec66a7065295a0c93d0b127.tar.xz
linux-c73f693989d7a7d99ec66a7065295a0c93d0b127.zip
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: 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>
Diffstat (limited to 'fs/cifs/cifs_unicode.c')
-rw-r--r--fs/cifs/cifs_unicode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/cifs_unicode.c b/fs/cifs/cifs_unicode.c
index 7dab9c04ad52..53cf2aabce87 100644
--- a/fs/cifs/cifs_unicode.c
+++ b/fs/cifs/cifs_unicode.c
@@ -328,7 +328,7 @@ cifsConvertToUTF16(__le16 *target, const char *source, int srclen,
}
ctoUTF16_out:
- return i;
+ return j;
}
#ifdef CONFIG_CIFS_SMB2