diff options
| author | Linus Torvalds <torvalds@home.osdl.org> | 2003-07-18 04:50:01 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-07-18 04:50:01 -0700 |
| commit | 2f88984e011b784f02b1644c9a82059998cea2c9 (patch) | |
| tree | 9c1acc7502127f8b1b06b034058bc92561438c1d | |
| parent | 1d02c2c0dfe098493f1359da83f1f2ba551f40a6 (diff) | |
Fix vfat shortname character logic that had wrong signedness
tests.
From Dennis Vshivkov:
"whenever I was trying to create a file using only national
characters for its name, it was always created with an
uppercased shortname (provided that the name was not too
long for 8.3, of course). Everything was fine with latin
filenames, though."
The bug is that we check "buf[0]" as an unsigned character, but
"buf" is just "char *", which (depending on architecture and
compiler options) tends to be signed.
| -rw-r--r-- | fs/vfat/namei.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/vfat/namei.c b/fs/vfat/namei.c index 12c067c8355d..0a366b54e2c5 100644 --- a/fs/vfat/namei.c +++ b/fs/vfat/namei.c @@ -375,7 +375,7 @@ shortname_info_to_lcase(struct shortname_info *base, } static inline int to_shortname_char(struct nls_table *nls, - char *buf, int buf_size, wchar_t *src, + unsigned char *buf, int buf_size, wchar_t *src, struct shortname_info *info) { int len; |
