mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-03-15 05:34:03 -04:00
pulse-server: ignore unsaveable values when deserializing property list
PulseAudio's property list can store arbitrary data, but pw_properties can only store null-terminated strings. So for the time being, ignore those values that don't have null-terminators or have zero bytes inside.
This commit is contained in:
parent
12bddf6521
commit
3fa92bbd15
1 changed files with 3 additions and 0 deletions
|
|
@ -125,6 +125,9 @@ static int read_props(struct message *m, struct pw_properties *props, bool remap
|
||||||
if (length != size)
|
if (length != size)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
if (strnlen(data, size) != size - 1)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (remap && (map = str_map_find(props_key_map, NULL, key)) != NULL) {
|
if (remap && (map = str_map_find(props_key_map, NULL, key)) != NULL) {
|
||||||
key = map->pw_str;
|
key = map->pw_str;
|
||||||
if (map->child != NULL &&
|
if (map->child != NULL &&
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue