Skip to contentSkip to conversation

dbus: NULL check proxy on method calls

PATCH Applied Brian Gix 2 participants 2 messages Dec 18, 2019

lore
Share & tools
lore

Brian Gix

author
#0 lore raw

PATCH v3 1/1 dbus: NULL check proxy on method calls

l_dbus_proxy_method_call() seg-faults when called with a NULL proxy pointer. This NULL check follows the pattern of NULL checks in the other LIB_EXPORT methods in module.

---
 ell/dbus-client.c | 3 +++
 1 file changed, 3 insertions(+)
ell/dbus-client.c +3 -0
index 541f3e8..2d8120e 100644
@@ -301,6 +301,9 @@ LIB_EXPORT uint32_t l_dbus_proxy_method_call(struct l_dbus_proxy *proxy,
 {
 	struct method_call_request *req;
 
+	if (unlikely(!proxy))
+		return 0;
+
 	req = l_new(struct method_call_request, 1);
 	req->proxy = proxy;
 	req->setup = setup;
Signature · 1 line
2.21.0
#1 lore raw

Hi Brian,

Quoted 6 lines · Brian Gix

l_dbus_proxy_method_call() seg-faults when called with a NULL proxy pointer. This NULL check follows the pattern of NULL checks in the other LIB_EXPORT methods in module.

---
  ell/dbus-client.c | 3 +++
  1 file changed, 3 insertions(+)

Applied, thanks.

Regards,
-Denis