mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04: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
1 changed files with 3 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue