From 627abec2e1c39d15a9a917c14a7923b6ab58cfd1 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 30 Dec 2008 21:27:22 +0100 Subject: [PATCH] Check that device name is valid before using it --- plugins/bluetooth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/bluetooth.c b/plugins/bluetooth.c index 1799f77..13f7d92 100644 --- a/plugins/bluetooth.c +++ b/plugins/bluetooth.c @@ -412,7 +412,7 @@ static void adapter_properties(DBusConnection *connection, const char *path, connman_device_set_path(adapter, path); - if (g_str_has_prefix(node, "hci") == TRUE) { + if (node != NULL && g_str_has_prefix(node, "hci") == TRUE) { int index; errno = 0; index = atoi(node + 3); -- 2.7.4