OSDN Git Service
(root)
/
android-x86
/
external-ntfs-3g.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
75da0ce
)
reparse.c: Fix big-endian bug when converting file name to lowercase.
author
Erik Larsson
<mechie@users.sourceforge.net>
Mon, 4 Jan 2016 09:19:05 +0000
(10:19 +0100)
committer
Erik Larsson
<mechie@users.sourceforge.net>
Mon, 4 Jan 2016 09:19:05 +0000
(10:19 +0100)
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.
libntfs-3g/reparse.c
patch
|
blob
|
history
diff --git
a/libntfs-3g/reparse.c
b/libntfs-3g/reparse.c
index
7b96902
..
ee14efb
100644
(file)
--- a/
libntfs-3g/reparse.c
+++ b/
libntfs-3g/reparse.c
@@
-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])
];
}
}
}