mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04: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
|
|
@ -393,8 +393,8 @@ static int parse_spa_libs(struct pw_context *context, char *str)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
while (spa_json_get_string(&it[1], key, sizeof(key)-1) > 0) {
|
||||
if (spa_json_get_string(&it[1], value, sizeof(value)-1) > 0) {
|
||||
while (spa_json_get_string(&it[1], key, sizeof(key)) > 0) {
|
||||
if (spa_json_get_string(&it[1], value, sizeof(value)) > 0) {
|
||||
pw_context_add_spa_lib(context, key, value);
|
||||
count++;
|
||||
}
|
||||
|
|
@ -445,7 +445,7 @@ static int parse_modules(struct pw_context *context, char *str)
|
|||
while (spa_json_enter_object(&it[1], &it[2]) > 0) {
|
||||
char *name = NULL, *args = NULL, *flags = NULL;
|
||||
|
||||
while (spa_json_get_string(&it[2], key, sizeof(key)-1) > 0) {
|
||||
while (spa_json_get_string(&it[2], key, sizeof(key)) > 0) {
|
||||
const char *val;
|
||||
int len;
|
||||
|
||||
|
|
@ -529,7 +529,7 @@ static int parse_objects(struct pw_context *context, char *str)
|
|||
while (spa_json_enter_object(&it[1], &it[2]) > 0) {
|
||||
char *factory = NULL, *args = NULL, *flags = NULL;
|
||||
|
||||
while (spa_json_get_string(&it[2], key, sizeof(key)-1) > 0) {
|
||||
while (spa_json_get_string(&it[2], key, sizeof(key)) > 0) {
|
||||
const char *val;
|
||||
int len;
|
||||
|
||||
|
|
@ -616,7 +616,7 @@ static int parse_exec(struct pw_context *context, char *str)
|
|||
while (spa_json_enter_object(&it[1], &it[2]) > 0) {
|
||||
char *path = NULL, *args = NULL;
|
||||
|
||||
while (spa_json_get_string(&it[2], key, sizeof(key)-1) > 0) {
|
||||
while (spa_json_get_string(&it[2], key, sizeof(key)) > 0) {
|
||||
const char *val;
|
||||
int len;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue