mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
pipewire-jack: fix property list underallocation
`(n_items) + 1 * sizeof(*items)` is not the correct size to allocate
for `n_items + 1` count of objects each with size `sizeof(*items)`,
the `+ 1` should be inside the parentheses.
Fixes #4481
Fixes: 4baa94fce2 ("thread: make it possible to set a custom create function")
This commit is contained in:
parent
4fa78021c7
commit
2d43b6b515
1 changed files with 1 additions and 1 deletions
|
|
@ -3234,7 +3234,7 @@ static struct spa_thread *impl_create(void *object,
|
|||
if (globals.creator != NULL) {
|
||||
uint32_t i, n_items = props ? props->n_items : 0;
|
||||
|
||||
items = alloca((n_items) + 1 * sizeof(*items));
|
||||
items = alloca((n_items + 1) * sizeof(*items));
|
||||
|
||||
for (i = 0; i < n_items; i++)
|
||||
items[i] = props->items[i];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue