* [PATCH BlueZ] gatt: sanitize input at profile registration
@ 2022-02-26 10:08 Andreas Kemnade
2022-02-26 12:34 ` [BlueZ] " bluez.test.bot
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Kemnade @ 2022-02-26 10:08 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Andreas Kemnade
Check whether type of UUIDs property of GattProfile1 object
is correct.
---
src/gatt-database.c | 5 +++++
1 file changed, 5 insertions(+)
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) {
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-26 12:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-26 10:08 [PATCH BlueZ] gatt: sanitize input at profile registration Andreas Kemnade
2022-02-26 12:34 ` [BlueZ] " bluez.test.bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox