mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
spa: handle empty values better
Make sure the properties are not empty before trying to access them.
This commit is contained in:
parent
61af61a4b3
commit
c534acac46
3 changed files with 13 additions and 6 deletions
|
|
@ -687,6 +687,9 @@ static int add_int(struct format_info *info, const char *k, struct spa_pod *para
|
|||
if (val->type != SPA_TYPE_Int)
|
||||
return -ENOTSUP;
|
||||
|
||||
if (n_values == 0)
|
||||
return -ENOENT;
|
||||
|
||||
values = SPA_POD_BODY(val);
|
||||
|
||||
switch (choice) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue