mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
json: spa_json_get_string() writes up to len chars or fail
This commit is contained in:
parent
68b31d37d9
commit
c46113faa3
17 changed files with 26 additions and 26 deletions
|
|
@ -42,7 +42,7 @@ static int bluez_card_object_message_handler(struct pw_manager *m, struct pw_man
|
|||
return -EINVAL;
|
||||
|
||||
spa_json_init(&it, params, strlen(params));
|
||||
if (spa_json_get_string(&it, codec, sizeof(codec)-1) <= 0)
|
||||
if (spa_json_get_string(&it, codec, sizeof(codec)) <= 0)
|
||||
return -EINVAL;
|
||||
|
||||
codec_id = atoi(codec);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue