[PATCH] Fix segfault: If the interface name is NULL the bluetoothd daemon will crash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 gdbus/object.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/gdbus/object.c b/gdbus/object.c
index 0786aeb..7bc9860 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -222,6 +222,9 @@ static void generic_unregister(DBusConnection *connection, void *user_data)
 static struct interface_data *find_interface(GSList *interfaces,
 						const char *name)
 {
+	if (NULL == name)
+		return NULL;
+
 	GSList *list;
 
 	for (list = interfaces; list; list = list->next) {
-- 
1.5.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux