Package: kbd Version: 2.0.4-4 Severity: minor Tags: upstream With a Unicode map containing a line like this…
0xFF U+23B5 U+1234,U+5678 U+CAFE … (of course, the codepoints are only examples) which follows the format specification in kbd-2.0.4/src/psfxtable.c, the output is wrong: 00001790 b5 23 fe ff 34 12 78 56 fe ca ff ff |.#..4.xV....| This is the output for… 0xFF U+23B5 U+1234,U+5678,U+CAFE … while expected would have been: 00001790 b5 23 fe ca fe ff 34 12 78 56 ff ff |.#....4.xV..| This is caused by parse_itab_line() around lines 198‥204 not checking if the current element is a sequnce or not first, and blindly adding/mixing sequences and non-sequences to the uclistheads, by using addpair() also for sequences, combined with kbd-2.0.4/src/psffontop.c (which incidentally duplicates addpair et al.) writepsffont, around lines 490‥500, not sorting the codepoints before the sequences. I discovered this during creating an independent PSF version 1 writer implementation. Mine basically goes through the map for a given fontpos twice, first outputting every entry without a comma, then every entry with. Proof: tglase@tglase-nb:/tmp $ tail -1 x.map 0xFF U+23B5 U+1234,U+5678 U+CAFE tglase@tglase-nb:/tmp $ psfaddtable /usr/share/consolefonts/mirf16v8.psf x.map x.psfu tglase@tglase-nb:/tmp $ psfgettable x.psfu | tail -1 0x0ff U+23b5 U+1234, U+5678, U+cafe tglase@tglase-nb:/tmp $ bdfctool -dp x.map <FixedMisc/mirf16v8.bdf >x.psfu tglase@tglase-nb:/tmp $ psfgettable x.psfu | tail -1 0x0ff U+23b5 U+cafe U+1234, U+5678 -- System Information: Debian Release: bullseye/sid APT prefers buildd-unstable APT policy: (500, 'buildd-unstable'), (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.4.0-3-amd64 (SMP w/2 CPU cores) Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C (charmap=UTF-8) Shell: /bin/sh linked to /bin/lksh Init: sysvinit (via /sbin/init) Versions of packages kbd depends on: ii libc6 2.29-10 Versions of packages kbd recommends: ii console-setup 2:11 kbd suggests no packages. -- no debconf information