mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-10 13:30:05 -05:00
json: add spa_json_parse_stringn()
It also checks the destination size.
This commit is contained in:
parent
c46113faa3
commit
611591d0fc
9 changed files with 30 additions and 20 deletions
|
|
@ -1632,7 +1632,7 @@ static int json_to_pod(struct spa_pod_builder *b, uint32_t id,
|
|||
}
|
||||
else {
|
||||
char *val = alloca(len+1);
|
||||
spa_json_parse_string(value, len, val);
|
||||
spa_json_parse_stringn(value, len, val, len+1);
|
||||
switch (info ? info->parent : SPA_TYPE_Struct) {
|
||||
case SPA_TYPE_Id:
|
||||
if ((ti = find_type_info(info->values, val)) != NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue