mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-04 06:46:24 -04:00
*: more type checks for POD
Check that POD is correctly typed before using it.
This commit is contained in:
parent
a50b66651e
commit
c64a34d93f
20 changed files with 67 additions and 28 deletions
|
|
@ -257,7 +257,8 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags,
|
|||
SPA_PROP_iec958Codecs, SPA_POD_OPT_Pod(&iec958_codecs),
|
||||
SPA_PROP_params, SPA_POD_OPT_Pod(¶ms));
|
||||
|
||||
if ((this->is_iec958 || this->is_hdmi) && iec958_codecs != NULL) {
|
||||
if ((this->is_iec958 || this->is_hdmi) && iec958_codecs != NULL &&
|
||||
spa_pod_is_array(iec958_codecs)) {
|
||||
uint32_t i, codecs[16], n_codecs;
|
||||
n_codecs = spa_pod_copy_array(iec958_codecs, SPA_TYPE_Id,
|
||||
codecs, SPA_N_ELEMENTS(codecs));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue