]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
Convert properly UTF-8 to UTF-16
authorFrediano Ziglio <frediano.ziglio@citrix.com>
Tue, 7 Aug 2012 09:33:03 +0000 (04:33 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Oct 2012 20:50:35 +0000 (05:50 +0900)
commit049917d4843acf4b024f1721d83fbe2875cdd937
treed4baf660c60f75684e09f6ea74a07a52411829bd
parentb034312000118d88ddb6027c262bf898440448ae
Convert properly UTF-8 to UTF-16

commit fd3ba42c76d3d4b776120c2b24c1791e7bb3deb1 upstream.

wchar_t is currently 16bit so converting a utf8 encoded characters not
in plane 0 (>= 0x10000) to wchar_t (that is calling char2uni) lead to a
-EINVAL return. This patch detect utf8 in cifs_strtoUTF16 and add special
code calling utf8s_to_utf16s.

Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Acked-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