json: spa_json_get_string() writes up to len chars or fail

This commit is contained in:
Wim Taymans 2022-01-04 10:42:32 +01:00
parent 68b31d37d9
commit c46113faa3
17 changed files with 26 additions and 26 deletions

View file

@ -787,7 +787,7 @@ static int parse_params(struct impl *impl)
spa_json_init(&it[0], str, strlen(str));
if (spa_json_enter_array(&it[0], &it[1]) > 0) {
while (spa_json_get_string(&it[1], value, sizeof(value)-1) > 0) {
while (spa_json_get_string(&it[1], value, sizeof(value)) > 0) {
if (create_server(impl, value) == NULL) {
pw_log_warn("%p: can't create server for %s: %m",
impl, value);