diff options
author | Andreas Kemnade <andreas@kemnade.info> | 2022-02-26 11:08:36 +0100 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-03-07 16:12:35 -0800 |
commit | 5e9342ee34ba162d16c25416ee23159070e48f2e (patch) | |
tree | 620931c69963f47493aeab86879655d266fe95a5 /src/gatt-database.c | |
parent | 18af5f4faf2658e99f91853798bc4c12f32f31f6 (diff) | |
download | bluez-5e9342ee34ba162d16c25416ee23159070e48f2e.tar.gz |
gatt: sanitize input at profile registration
Check whether type of UUIDs property of GattProfile1 object
is correct.
Diffstat (limited to 'src/gatt-database.c')
-rw-r--r-- | src/gatt-database.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gatt-database.c b/src/gatt-database.c index 481222d44..485af04ea 100644 --- a/src/gatt-database.c +++ b/src/gatt-database.c @@ -3423,6 +3423,11 @@ static struct external_profile *create_profile(struct gatt_app *app, goto fail; } + if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_ARRAY) { + DBG("UUIDs wrongly formatted"); + goto fail; + } + dbus_message_iter_recurse(&iter, &array); while (dbus_message_iter_get_arg_type(&array) == DBUS_TYPE_STRING) { |