diff options
author | oleid@mescharet.de <oleid@mescharet.de> | 2015-11-24 21:07:32 +0000 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2017-09-08 17:59:42 +0200 |
commit | fa38e1c4040f5e48cd6b56aa838b4ac617e1e1a8 (patch) | |
tree | 5930d463aa91dfa237f6032643cbc882e73ccf20 /src | |
parent | 877a233ef664c5aa1503f51e66b06731ea4fd2c4 (diff) | |
download | upower-fa38e1c4040f5e48cd6b56aa838b4ac617e1e1a8.tar.gz |
daemon: Fix crash when '@' is present in the device name
GDBus doesn't like '@' in the object path, so escape it.
https://bugs.freedesktop.org/show_bug.cgi?id=93095
Diffstat (limited to 'src')
-rw-r--r-- | src/up-device.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/up-device.c b/src/up-device.c index ccc1a00..f8befe8 100644 --- a/src/up-device.c +++ b/src/up-device.c @@ -371,6 +371,8 @@ up_device_compute_object_path (UpDevice *device) id[i] = 'x'; if (id[i] == ':') id[i] = 'o'; + if (id[i] == '@') + id[i] = '_'; } object_path = g_build_filename (UP_DEVICES_DBUS_PATH, id, NULL); |