diff options
author | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2008-04-14 20:36:20 +0000 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2008-04-14 20:36:20 +0000 |
commit | cddee8f1044440a24f2c2ea98ebf529dc3db7de0 (patch) | |
tree | 15e62448ee8f33df0e8a9de753be593a562ac35c | |
parent | 488db954d40281fda44f73dbf808bbd80f695915 (diff) |
Fix bug on CreateDevice which doesn't check if the address given is valid.
-rw-r--r-- | hcid/adapter.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hcid/adapter.c b/hcid/adapter.c index 6eb306e9..cd75e6c9 100644 --- a/hcid/adapter.c +++ b/hcid/adapter.c @@ -3755,6 +3755,9 @@ static DBusHandlerResult create_device(DBusConnection *conn, DBUS_TYPE_INVALID) == FALSE) return error_invalid_arguments(conn, msg, NULL); + if (check_address(address) < 0) + return error_invalid_arguments(conn, msg, NULL); + if (adapter_find_device(adapter, address)) return error_already_exists(conn, msg, "Device already exists"); |