NLS: improve UTF8 -> UTF16 string conversion routine
[pandora-kernel.git] / fs / fat / namei_vfat.c
index a87a656..c25cf15 100644 (file)
@@ -512,7 +512,8 @@ xlate_to_uni(const unsigned char *name, int len, unsigned char *outname,
        int charlen;
 
        if (utf8) {
-               *outlen = utf8s_to_utf16s(name, len, (wchar_t *)outname);
+               *outlen = utf8s_to_utf16s(name, len, UTF16_HOST_ENDIAN,
+                               (wchar_t *) outname, FAT_LFN_LEN + 2);
                if (*outlen < 0)
                        return *outlen;
                else if (*outlen > FAT_LFN_LEN)