Message ID | 20250302090331.17756-2-arkadiusz.bokowy@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 32e2e5a42b2b51b7a196de0b5bd199eeb5ce4725 |
Headers | show |
Series | [BlueZ,1/2] uuid-helper: Accept any 16-bit HEX value as a valid UUID | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
diff --git a/src/device.c b/src/device.c index ec97fc889..aca28af8c 100644 --- a/src/device.c +++ b/src/device.c @@ -2646,6 +2646,10 @@ static DBusMessage *connect_profile(DBusConnection *conn, DBusMessage *msg, } uuid = bt_name2string(pattern); + if (uuid == NULL) + return btd_error_invalid_args_str(msg, + ERR_BREDR_CONN_INVALID_ARGUMENTS); + reply = connect_profiles(dev, BDADDR_BREDR, msg, uuid); free(uuid); diff --git a/src/profile.c b/src/profile.c index 9fdfb7dff..ad2043628 100644 --- a/src/profile.c +++ b/src/profile.c @@ -2319,6 +2319,8 @@ static int parse_ext_opt(struct ext_profile *ext, const char *key, dbus_message_iter_get_basic(value, &str); free(ext->service); ext->service = bt_name2string(str); + if (ext->service == NULL) + return -EINVAL; } return 0;