Commit 2f88984e authored by Linus Torvalds's avatar Linus Torvalds

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.
parent 1d02c2c0
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment