diff options
Diffstat (limited to 'fs/fat')
-rw-r--r-- | fs/fat/namei_vfat.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c index a87a65663c25..c25cf151b84b 100644 --- a/fs/fat/namei_vfat.c +++ b/fs/fat/namei_vfat.c | |||
@@ -512,7 +512,8 @@ xlate_to_uni(const unsigned char *name, int len, unsigned char *outname, | |||
512 | int charlen; | 512 | int charlen; |
513 | 513 | ||
514 | if (utf8) { | 514 | if (utf8) { |
515 | *outlen = utf8s_to_utf16s(name, len, (wchar_t *)outname); | 515 | *outlen = utf8s_to_utf16s(name, len, UTF16_HOST_ENDIAN, |
516 | (wchar_t *) outname, FAT_LFN_LEN + 2); | ||
516 | if (*outlen < 0) | 517 | if (*outlen < 0) |
517 | return *outlen; | 518 | return *outlen; |
518 | else if (*outlen > FAT_LFN_LEN) | 519 | else if (*outlen > FAT_LFN_LEN) |