summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-adapter.c
diff options
context:
space:
mode:
Diffstat (limited to 'hcid/dbus-adapter.c')
-rw-r--r--hcid/dbus-adapter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hcid/dbus-adapter.c b/hcid/dbus-adapter.c
index 3fbd0c36..2989536c 100644
--- a/hcid/dbus-adapter.c
+++ b/hcid/dbus-adapter.c
@@ -1036,8 +1036,8 @@ static DBusHandlerResult handle_dev_set_name_req(DBusConnection *conn, DBusMessa
dbus_error_free(&err);
return error_invalid_arguments(conn, msg);
}
-
- if (strlen(str_ptr) == 0) {
+
+ if (strlen(str_ptr) == 0 || !g_utf8_validate(str_ptr, -1, NULL)) {
error("Name change failed: Invalid parameter");
return error_invalid_arguments(conn, msg);
}