mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-03 06:47:04 -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
|
|
@ -834,6 +834,11 @@ static void parse_props(struct global *g, const struct spa_pod *param, bool devi
|
|||
struct spa_pod_object *obj = (struct spa_pod_object *) param;
|
||||
snd_ctl_pipewire_t *ctl = g->ctl;
|
||||
|
||||
if (!spa_pod_is_object_type(param, SPA_TYPE_OBJECT_Props)) {
|
||||
pw_log_warn("cannot parse %d props", g->id);
|
||||
return;
|
||||
}
|
||||
|
||||
SPA_POD_OBJECT_FOREACH(obj, prop) {
|
||||
switch (prop->key) {
|
||||
case SPA_PROP_volume:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue