reparse.c: Fix big-endian bug when converting file name to lowercase.

When looking up the lowercase equivalent of a Unicode character in
ntfs_fix_file_name, no byte swapping was performed on the ntfschar used
as index into the 'locase' array. This would lead to very strange
results on big-endian systems.
edge.strict_endians
Erik Larsson 2016-01-04 10:19:05 +01:00
parent 75da0ce302
commit 84f042e739
1 changed files with 1 additions and 1 deletions

View File

@ -195,7 +195,7 @@ static u64 ntfs_fix_file_name(ntfs_inode *dir_ni, ntfschar *uname,
uname[i] = found->file_name[i];
} else {
for (i=0; i<found->file_name_length; i++)
uname[i] = vol->locase[found->file_name[i]];
uname[i] = vol->locase[le16_to_cpu(found->file_name[i])];
}
}
}