mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
media-session: fix match rule
When matching without regex, don't just to a startswith check but also check that the sizes of the strings match. Fixes #1098
This commit is contained in:
parent
53cd601869
commit
a611128a79
1 changed files with 2 additions and 1 deletions
|
|
@ -72,7 +72,8 @@ static bool find_match(struct spa_json *arr, struct pw_properties *props)
|
|||
success = true;
|
||||
regfree(&preg);
|
||||
}
|
||||
} else if (strncmp(str, value, len) == 0) {
|
||||
} else if (strncmp(str, value, len) == 0 &&
|
||||
strlen(str) == (size_t)len) {
|
||||
success = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue