xdg-screensaver: libdbus assertion when window title is not valid UTF-8
Submitted by Iain Lane
Assigned to Portland Bugs
Link to original bug (#108121)
Description
Created attachment 141830 xdg-screensaver: Sanitise window name before sending it over the bus
I first saw this on Launchpad:
https://bugs.launchpad.net/ubuntu/+source/xdg-utils/+bug/1743216
When the window title of the WID passed to suspend is invalid utf-8, we get a crash like this:
dbus[19455]: arguments to dbus_message_iter_append_basic() were incorrect, assertion "_dbus_check_is_valid_utf8 (*string_p)" failed in file ../../../dbus/dbus-message.c line 2754.
Here's a patch to use Encode (in perl core since 5.8 apparently) to replace such characters with U+FFFD.
Patch 141830, "xdg-screensaver: Sanitise window name before sending it over the bus":
0001-xdg-screensaver-Sanitise-window-name-before-sending-.patch