mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-07-03 00:06:38 -04:00
conf: fix matching of property values with colons
Use spa_json_begin_array() instead of the relaxed variant when parsing property values in pw_conf_find_match(). This prevents plain string values containing ':' (such as object.path) from being incorrectly tokenized while preserving support for actual JSON array properties.
This commit is contained in:
parent
7dac6a71d5
commit
62e98466fa
1 changed files with 1 additions and 1 deletions
|
|
@ -712,7 +712,7 @@ bool pw_conf_find_match(struct spa_json *arr, const struct spa_dict *props, bool
|
||||||
reg = false;
|
reg = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (spa_json_begin_array_relax(&it[1], str, strlen(str)) > 0) {
|
if (spa_json_begin_array(&it[1], str, strlen(str)) > 0) {
|
||||||
while (spa_json_get_string(&it[1], v, sizeof(v)) > 0) {
|
while (spa_json_get_string(&it[1], v, sizeof(v)) > 0) {
|
||||||
if ((reg && regexec(&preg, v, 0, NULL, 0) == 0) ||
|
if ((reg && regexec(&preg, v, 0, NULL, 0) == 0) ||
|
||||||
spa_streq(v, val)) {
|
spa_streq(v, val)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue