summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2006-10-30 11:10:37 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2006-10-30 11:10:37 +0000
commit46d50e58b405d591e75ee8350aa5cba0cb8c73eb (patch)
tree14ac26f95cfb224af6d2dcf0e2908a8f4ee7df8a /hcid
parentb467488a2ed54badfff71b4aa892ded051670aa3 (diff)
SetTrusted: check if address is valid or not
Diffstat (limited to 'hcid')
-rw-r--r--hcid/dbus-service.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hcid/dbus-service.c b/hcid/dbus-service.c
index 7cb1ef01..77d50730 100644
--- a/hcid/dbus-service.c
+++ b/hcid/dbus-service.c
@@ -485,6 +485,9 @@ static DBusHandlerResult set_trusted(DBusConnection *conn,
DBUS_TYPE_INVALID))
return error_invalid_arguments(conn, msg);
+ if (check_address(address) < 0)
+ return error_invalid_arguments(conn, msg);
+
l = slist_find(agent->trusted_devices, address, (cmp_func_t) strcmp);
if (l)
return error_failed(conn, msg, EINVAL);