diff options
author | Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com> | 2018-08-22 06:59:19 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-22 19:52:50 +0200 |
commit | afd6c9e1f5287ad236adcf56db8c42fef65561fa (patch) | |
tree | 873279d1400a511e6c6cb739a39f1b9eeee294a0 /fs/hfsplus/super.c | |
parent | hfsplus: avoid deadlock on file truncation (diff) | |
download | linux-afd6c9e1f5287ad236adcf56db8c42fef65561fa.tar.xz linux-afd6c9e1f5287ad236adcf56db8c42fef65561fa.zip |
hfsplus: fix decomposition of Hangul characters
Files created under macOS cannot be opened under linux if their names
contain Korean characters, and vice versa.
The Korean alphabet is special because its normalization is done without a
table. The module deals with it correctly when composing, but forgets
about it for the decomposition.
Fix this using the Hangul decomposition function provided in the Unicode
Standard. The code fits a bit awkwardly because it requires a buffer,
while all the other normalizations are returned as pointers to the
decomposition table. This is actually also a bug because reordering may
still be needed, but for now leave it as it is.
The patch will cause trouble for Hangul filenames already created by the
module in the past. This shouldn't really be concern because its main
purpose was always sharing with macOS. If a user actually needs to access
such a file the nodecompose mount option should be enough.
Link: http://lkml.kernel.org/r/20180717220951.p6qqrgautc4pxvzu@eaf
Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
Reported-by: Ting-Chang Hou <tchou@synology.com>
Tested-by: Ting-Chang Hou <tchou@synology.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/hfsplus/super.c')
0 files changed, 0 insertions, 0 deletions