diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2015-10-04 17:53:46 +0900 |
---|---|---|
committer | Mike Blumenkrantz <zmike@osg.samsung.com> | 2015-10-04 08:42:28 -0400 |
commit | d7c27e407b0bad663891faa667d76fa5d8438b58 (patch) | |
tree | 5a3efbbfa22cb6dc8c4aadd50532932a87e044db | |
parent | a2c2b0fa0373d7add8d5e2b2b7362379797dca6c (diff) | |
download | efl-d7c27e407b0bad663891faa667d76fa5d8438b58.tar.gz |
eldbus - make method calls less crasy since libdbus likes to abort
changes zmike made to e's systray make e abort due to libdbus seeing
the bus name as invalid. it actually is. it's
/org/ayatana/NotificationItem/steam for example - instead of
or.whatever.blah - thuis e aborts continually if you run steam at all.
eldbus should be more crash-proof thus this adds checks so dbus fun
doesnt cause an app to crash if it happens to call incorrect dbus names.
@fix
-rw-r--r-- | src/lib/eldbus/eldbus_message.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/eldbus/eldbus_message.c b/src/lib/eldbus/eldbus_message.c index 03b8d642c2..5b8763dd4c 100644 --- a/src/lib/eldbus/eldbus_message.c +++ b/src/lib/eldbus/eldbus_message.c @@ -108,6 +108,22 @@ eldbus_message_method_call_new(const char *dest, const char *path, const char *i EINA_SAFETY_ON_NULL_RETURN_VAL(iface, NULL); EINA_SAFETY_ON_NULL_RETURN_VAL(method, NULL); + if (!dbus_validate_bus_name(dest, NULL)) + { + ERR("Invalid bus name '%s'", dest); + return NULL; + } + if (!dbus_validate_path(path, NULL)) + { + ERR("Invalid path '%s'", path); + return NULL; + } + if (!dbus_validate_interface(iface, NULL)) + { + ERR("Invalid interface '%s'", iface); + return NULL; + } + msg = eldbus_message_new(EINA_TRUE); EINA_SAFETY_ON_NULL_GOTO(msg, fail); |