]> code.delx.au - pulseaudio/commitdiff
dbus: Fix segfault when receiving a property access call that isn't permitted.
authorTanu Kaskinen <ext-tanu.kaskinen@nokia.com>
Mon, 29 Mar 2010 05:25:42 +0000 (08:25 +0300)
committerTanu Kaskinen <ext-tanu.kaskinen@nokia.com>
Mon, 10 May 2010 11:10:09 +0000 (14:10 +0300)
src/pulsecore/protocol-dbus.c

index 582bc65833b25e87740c68b7f34665e5cd8d217e..a8a9d6030d550dd7a008a7afd569f37806843b97 100644 (file)
@@ -406,7 +406,7 @@ static enum find_result_t find_handler_from_properties_call(struct call_info *ca
                 return NO_SUCH_PROPERTY_INTERFACE;
             else if ((call_info->property_handler =
                         pa_hashmap_get(call_info->iface_entry->property_handlers, call_info->property)))
-                return FOUND_GET_PROPERTY;
+                return call_info->property_handler->get_cb ? FOUND_GET_PROPERTY : PROPERTY_ACCESS_DENIED;
             else
                 return NO_SUCH_PROPERTY;
 
@@ -440,7 +440,7 @@ static enum find_result_t find_handler_from_properties_call(struct call_info *ca
                 call_info->expected_property_sig = call_info->property_handler->type;
 
                 if (pa_streq(call_info->property_sig, call_info->expected_property_sig))
-                    return FOUND_SET_PROPERTY;
+                    return call_info->property_handler->set_cb ? FOUND_SET_PROPERTY : PROPERTY_ACCESS_DENIED;
                 else
                     return INVALID_PROPERTY_SIG;