mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-04-19 06:46:26 -04:00
pod: check that choices are not empty
Before using the contents of a choice, check that it is not empty to avoid reading out of bounds.
This commit is contained in:
parent
d37bdf5cbf
commit
b04da87e38
7 changed files with 18 additions and 4 deletions
|
|
@ -185,7 +185,7 @@ SPA_API_DEBUG_FORMAT int spa_debugc_format(struct spa_debug_context *ctx, int in
|
|||
size = val->size;
|
||||
vals = SPA_POD_BODY(val);
|
||||
|
||||
if (type < SPA_TYPE_None || type >= _SPA_TYPE_LAST)
|
||||
if (type < SPA_TYPE_None || type >= _SPA_TYPE_LAST || n_vals < 1)
|
||||
continue;
|
||||
|
||||
ti = spa_debug_type_find(info, prop->key);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue