> On Wed, 2016-08-17 at 14:43 +0200, Peter Meerwald-Stadler wrote:
> > I can't find an easy argument why the NULL dereference can't happen (as I 
> > am not intimate with the semantics of the dbus functions involved)
> 
> Sorry, I should have provided an explanation already in my previous
> mail.

will add that to the commit message, thanks!
 
> > why is d always != NULL when 
> > dbus_message_is_method_call(p->message, "org.bluez.Device",
> > "GetProperties") != 0?
> 
> Because of this part:
> 
>     if (dbus_message_has_interface(p->message, "org.bluez.Manager") ||
>         dbus_message_has_interface(p->message, "org.bluez.Adapter"))
>         d = NULL;
>     else if (!(d = pa_hashmap_get(y->devices, 
> dbus_message_get_path(p->message)))) {
>         pa_log_warn("Received GetProperties() reply from unknown device: %s 
> (device removed?)", dbus_message_get_path(p->message));
>         goto finish2;
>     }
> 
> d can be NULL only if p->message interface is org.bluez.Manager or
> org.bluez.Adapter. If
> 
>     dbus_message_is_method_call(p->message, "org.bluez.Device", 
> "GetProperties")
> 
> returns true, we know that the interface is org.bluez.Device.
> 
> -- 
> Tanu
> _______________________________________________
> pulseaudio-discuss mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
> 

-- 

Peter Meerwald-Stadler
+43-664-2444418 (mobile)
_______________________________________________
pulseaudio-discuss mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

Reply via email to