diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2006-09-03 00:41:45 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2006-09-03 00:41:45 +0000 |
commit | cd32365b7df292e229139788aba843183c8598d7 (patch) | |
tree | c9fe3a8672bffec11c5b36717a21f94e1bb6413f | |
parent | 3d6f08cb24a31bf76cb3e934dddbc1f8d52d4c94 (diff) |
Check discovery_requestor before using it
-rw-r--r-- | hcid/dbus-adapter.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hcid/dbus-adapter.c b/hcid/dbus-adapter.c index 4dcd629f..d52a8f6a 100644 --- a/hcid/dbus-adapter.c +++ b/hcid/dbus-adapter.c @@ -2265,7 +2265,8 @@ static DBusHandlerResult handle_dev_cancel_discovery_req(DBusConnection *conn, D return error_not_authorized(conn, msg); /* FIXME: find a better error name */ /* only the discover requestor can cancel the inquiry process */ - if (strcmp(dbus_data->discovery_requestor, requestor_name)) + if (!dbus_data->discovery_requestor || + strcmp(dbus_data->discovery_requestor, requestor_name)) return error_not_authorized(conn, msg); dd = hci_open_dev(dbus_data->dev_id); |