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
|
|
@ -870,6 +870,8 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags,
|
|||
|
||||
case SPA_PARAM_Props:
|
||||
{
|
||||
if (!spa_pod_is_object_type(param, SPA_TYPE_OBJECT_Props))
|
||||
return -EINVAL;
|
||||
int in_set_param = ++this->in_set_param;
|
||||
res = spa_node_set_param(this->follower, id, flags, param);
|
||||
if (this->target != this->follower && this->in_set_param == in_set_param)
|
||||
|
|
@ -880,6 +882,8 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags,
|
|||
break;
|
||||
}
|
||||
case SPA_PARAM_ProcessLatency:
|
||||
if (!spa_pod_is_object_type(param, SPA_TYPE_OBJECT_ParamProcessLatency))
|
||||
return -EINVAL;
|
||||
res = spa_node_set_param(this->follower, id, flags, param);
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue