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:
Barnabás Pőcze 2025-01-05 21:37:14 +01:00 committed by Wim Taymans
parent 0d497a5f43
commit 591c40eed4

View file

@ -3348,7 +3348,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];