Bug 108121 - xdg-screensaver: libdbus assertion when window title is not valid UTF-8
Summary: xdg-screensaver: libdbus assertion when window title is not valid UTF-8
Status: NEW
Alias: None
Product: Portland
Classification: Unclassified
Component: xdg-utils (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Portland Bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-02 09:47 UTC by Iain Lane
Modified: 2018-10-02 09:47 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
xdg-screensaver: Sanitise window name before sending it over the bus (1.16 KB, patch)
2018-10-02 09:47 UTC, Iain Lane
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Iain Lane 2018-10-02 09:47:07 UTC
Created attachment 141830 [details] [review]
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.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.