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
|
|
@ -567,6 +567,8 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags,
|
|||
case SPA_PARAM_Props:
|
||||
{
|
||||
int res, codec_res = 0;
|
||||
if (!spa_pod_is_object_type(param, SPA_TYPE_OBJECT_Props))
|
||||
return -EINVAL;
|
||||
res = apply_props(this, param);
|
||||
if (this->codec_props && this->codec->set_props) {
|
||||
codec_res = this->codec->set_props(this->codec_props, param);
|
||||
|
|
|
|||
|
|
@ -383,6 +383,8 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags,
|
|||
case SPA_PARAM_Props:
|
||||
{
|
||||
int res, codec_res = 0;
|
||||
if (!spa_pod_is_object_type(param, SPA_TYPE_OBJECT_Props))
|
||||
return -EINVAL;
|
||||
res = apply_props(this, param);
|
||||
if (this->codec_props && this->codec->set_props) {
|
||||
codec_res = this->codec->set_props(this->codec_props, param);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue