Apply patches for invalid UTF-8 truncation issue
Description:
libxklavier can generate invalid UTF-8 strings because it truncates strings at 192 bytes (including NUL). These invalid strings cause crashes in apps like cinnamon-settings and mate-keyboard-properties.
libxklavier is unmaintained, but one of the xkeyboard-config maintainers wrote patches to avoid the invalid UTF-8 strings (while maintaining ABI compatibility).
These patches have been applied to the stable Fedora package. I am hoping they can be applied to the Arch package, as well.
References:
- Fedora
- Patches (based off of this MR)
- Package promotion and history
- Arch
- Bug reports
- xkeyboard-config bug report that led to the patches
- Cinnamon bug report
- MATE bug report
Additional info:
- package version(s):
- cinnamon 6.0.4-1
- libxklavier 5.4-5
Steps to reproduce:
# With a Cinnamon desktop environment:
$ cat /etc/locale.gen
bg_BG.UTF-8 UTF-8
en_US.UTF-8 UTF-8
$ sudo locale-gen
$ LANG=bg_BG.UTF-8 cinnamon-settings
# Navigate to Keyboard > 'Layouts' tab
# Click the 'Options...' button to trigger a crash