[PATCH] fix abort when selinux denies a message

Bill Nottingham notting at redhat.com
Fri Sep 14 12:48:58 PDT 2007


AKA "don't pass NULL to dbus_error_is_set".

(For any license discussions, this is contributed under 'whatever the license
of upstream dbus is, and can be relicensed along with it.')

Bill
-------------- next part --------------
diff -up dbus-1.1.2/bus/bus.c.foo dbus-1.1.2/bus/bus.c
--- dbus-1.1.2/bus/bus.c.foo	2007-09-14 15:26:08.000000000 -0400
+++ dbus-1.1.2/bus/bus.c	2007-09-14 15:26:08.000000000 -0400
@@ -1206,7 +1206,7 @@ bus_context_check_security_policy (BusCo
 				    dest ? dest : DBUS_SERVICE_DBUS, error))
         {
 
-	  if (dbus_error_is_set (error) &&
+	  if (error != NULL && dbus_error_is_set (error) &&
 	      dbus_error_has_name (error, DBUS_ERROR_NO_MEMORY))
 	    {
 	      return FALSE;


More information about the dbus mailing list