Closed mike-fabian closed 1 year ago
It also segfaults when getting unassigned Unicode code points like U+1FFF (does not exist) as input:
First give ☺ U+263A WHITE SMILING FACE as a test that my use of iconv is OK:
mfabian@hathi:/local/mfabian/src/whichfont (main)
$ .builddir/whichfont -u $(echo -n -e "\x26\x3a" | iconv -f utf16be -t utf-8)
"☺" unicode: U+263A
DejaVuSans.ttf: "DejaVu Sans" "Regular"
mfabian@hathi:/local/mfabian/src/whichfont (main)
$
Good, now U+2028 LINE SEPARATOR and the unassigned U+1FFF:
$ .builddir/whichfont -u $(echo -n -e "\x20\x28" | iconv -f utf16be -t utf-8)
Segmentation fault (core dumped)
mfabian@hathi:/local/mfabian/src/whichfont (main)
$ .builddir/whichfont -u $(echo -n -e "\x1f\xff" | iconv -f utf16be -t utf-8)
Segmentation fault (core dumped)
mfabian@hathi:/local/mfabian/src/whichfont (main)
$
$ ./.builddir/whichfont -u $(echo -e "\xe2\x80\xa8")
Segmentation fault (core dumped)
"\xe2\x80\xa8" is the UTF-8 encoding of U+2028