diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-30 12:31:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-30 12:31:14 -0400 |
commit | 4c8f1cb266cba4d1052f524d04df839d8f732ace (patch) | |
tree | 4bf2e6bcc56dcce2c919bca969f6626c8f18b7e6 /fs/nls | |
parent | 9c1fe834c1bd7725b411055c66886b64c928083d (diff) | |
parent | ed248b290da7297c9b9a3ff180f5eee4db016224 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/hirofumi/fatfs-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/hirofumi/fatfs-2.6:
fat: Check s_dirt in fat_sync_fs()
vfat: change the default from shortname=lower to shortname=mixed
fat/nls: Fix handling of utf8 invalid char
Diffstat (limited to 'fs/nls')
-rw-r--r-- | fs/nls/nls_base.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/nls/nls_base.c b/fs/nls/nls_base.c index 2224b4d07bf0..44a88a9fa2c8 100644 --- a/fs/nls/nls_base.c +++ b/fs/nls/nls_base.c | |||
@@ -124,10 +124,10 @@ int utf8s_to_utf16s(const u8 *s, int len, wchar_t *pwcs) | |||
124 | while (*s && len > 0) { | 124 | while (*s && len > 0) { |
125 | if (*s & 0x80) { | 125 | if (*s & 0x80) { |
126 | size = utf8_to_utf32(s, len, &u); | 126 | size = utf8_to_utf32(s, len, &u); |
127 | if (size < 0) { | 127 | if (size < 0) |
128 | /* Ignore character and move on */ | 128 | return -EINVAL; |
129 | size = 1; | 129 | |
130 | } else if (u >= PLANE_SIZE) { | 130 | if (u >= PLANE_SIZE) { |
131 | u -= PLANE_SIZE; | 131 | u -= PLANE_SIZE; |
132 | *op++ = (wchar_t) (SURROGATE_PAIR | | 132 | *op++ = (wchar_t) (SURROGATE_PAIR | |
133 | ((u >> 10) & SURROGATE_BITS)); | 133 | ((u >> 10) & SURROGATE_BITS)); |