* [PATCH v3] dbus: NULL check proxy on method calls
@ 2019-12-18 15:12 Brian Gix
2019-12-18 16:25 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: Brian Gix @ 2019-12-18 15:12 UTC (permalink / raw)
To: ell
[-- Attachment #1: Type: text/plain, Size: 662 bytes --]
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(+)
diff --git a/ell/dbus-client.c b/ell/dbus-client.c
index 541f3e8..2d8120e 100644
--- a/ell/dbus-client.c
+++ b/ell/dbus-client.c
@@ -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;
--
2.21.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3] dbus: NULL check proxy on method calls
2019-12-18 15:12 [PATCH v3] dbus: NULL check proxy on method calls Brian Gix
@ 2019-12-18 16:25 ` Denis Kenzior
0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2019-12-18 16:25 UTC (permalink / raw)
To: ell
[-- Attachment #1: Type: text/plain, Size: 346 bytes --]
Hi Brian,
On 12/18/19 9:12 AM, Brian Gix wrote:
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-18 16:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-18 15:12 [PATCH v3] dbus: NULL check proxy on method calls Brian Gix
2019-12-18 16:25 ` Denis Kenzior
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.