mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -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
|
|
@ -90,7 +90,7 @@ static int dump(FILE *file, int indent, struct spa_json *it, const char *value,
|
|||
} else if (spa_json_is_object(value, len)) {
|
||||
fprintf(file, "{");
|
||||
spa_json_enter(it, &sub);
|
||||
while (spa_json_get_string(&sub, key, sizeof(key)-1) > 0) {
|
||||
while (spa_json_get_string(&sub, key, sizeof(key)) > 0) {
|
||||
fprintf(file, "%s\n%*s",
|
||||
count++ > 0 ? "," : "",
|
||||
indent+2, "");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue