mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-09-30 05:05:27 +00:00
bluez5: bap: Rework broadcast code length check
Co-authored-by: P V <pav@iki.fi>
This commit is contained in:
parent
4c1271805e
commit
88d9d58333
|
@ -6174,8 +6174,9 @@ static void parse_broadcast_source_config(struct spa_bt_monitor *monitor, const
|
|||
if (spa_streq(key, "broadcast_code")) {
|
||||
if (spa_json_get_string(&it[1], bcode, sizeof(bcode)) <= 0)
|
||||
goto parse_failed;
|
||||
if (strlen(bcode) <= 16)
|
||||
memcpy(big_entry->broadcast_code, bcode, strlen(bcode));
|
||||
if (strlen(bcode) > BROADCAST_CODE_LEN)
|
||||
goto parse_failed;
|
||||
memcpy(big_entry->broadcast_code, bcode, strlen(bcode));
|
||||
spa_log_debug(monitor->log, "big_entry->broadcast_code %s", big_entry->broadcast_code);
|
||||
} else if (spa_streq(key, "encryption")) {
|
||||
if (spa_json_get_bool(&it[1], &big_entry->encryption) <= 0)
|
||||
|
|
Loading…
Reference in a new issue