mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-19 07:00:10 -05:00
properties: fix value allocation
We need an extra byte for the \0
This commit is contained in:
parent
febe8054e4
commit
746c714b0c
1 changed files with 1 additions and 1 deletions
|
|
@ -172,7 +172,7 @@ int pw_properties_update_string(struct pw_properties *props, const char *str, si
|
||||||
if (spa_json_is_container(value, len))
|
if (spa_json_is_container(value, len))
|
||||||
len = spa_json_container_len(&it[1], value, len);
|
len = spa_json_container_len(&it[1], value, len);
|
||||||
|
|
||||||
if ((val = malloc(len)) != NULL)
|
if ((val = malloc(len+1)) != NULL)
|
||||||
spa_json_parse_string(value, len, val);
|
spa_json_parse_string(value, len, val);
|
||||||
}
|
}
|
||||||
count += pw_properties_set(&impl->this, key, val);
|
count += pw_properties_set(&impl->this, key, val);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue