*: more type checks for POD

Check that POD is correctly typed before using it.
This commit is contained in:
Demi Marie Obenour 2025-07-24 19:33:38 -04:00
parent a50b66651e
commit c64a34d93f
20 changed files with 67 additions and 28 deletions

View file

@ -187,15 +187,17 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags,
case SPA_PARAM_Props:
{
struct props *p = &this->props;
int res;
if (param == NULL) {
reset_props(p);
return 0;
}
spa_pod_parse_object(param,
if ((res = spa_pod_parse_object(param,
SPA_TYPE_OBJECT_Props, NULL,
SPA_PROP_volume, SPA_POD_OPT_Float(&p->volume),
SPA_PROP_mute, SPA_POD_OPT_Bool(&p->mute));
SPA_PROP_mute, SPA_POD_OPT_Bool(&p->mute))) < 0)
return res;
break;
}
default: