mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
pw-cat: don't overrun our param array
This commit is contained in:
parent
77651e130e
commit
b3f8df6dfc
1 changed files with 2 additions and 1 deletions
|
|
@ -1977,7 +1977,8 @@ int main(int argc, char *argv[])
|
|||
uint32_t i, n_items = 0;
|
||||
|
||||
for (i = 0; i < data.props->dict.n_items; i++) {
|
||||
if (spa_strstartswith(data.props->dict.items[i].key, "media."))
|
||||
if (n_items < SPA_N_ELEMENTS(items) &&
|
||||
spa_strstartswith(data.props->dict.items[i].key, "media."))
|
||||
items[n_items++] = data.props->dict.items[i];
|
||||
}
|
||||
if (n_items > 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue