raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9a467c0451e0ed753b922e54630bf99e58ddacfb

commit 9a467c0451e0ed753b922e54630bf99e58ddacfb
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Sun Oct 4 17:53:46 2015 +0900

    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
---
 src/lib/eldbus/eldbus_message.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/lib/eldbus/eldbus_message.c b/src/lib/eldbus/eldbus_message.c
index 54cba80..56f87d2 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);
 

-- 


Reply via email to