mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-16 08:56:45 -05: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;
|
uint32_t i, n_items = 0;
|
||||||
|
|
||||||
for (i = 0; i < data.props->dict.n_items; i++) {
|
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];
|
items[n_items++] = data.props->dict.items[i];
|
||||||
}
|
}
|
||||||
if (n_items > 0) {
|
if (n_items > 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue