protocol: don't allow NULL event or command

If causes crashes when the handlers try to get the ID.
This commit is contained in:
Wim Taymans 2024-01-03 14:04:13 +01:00
parent 4ef891b047
commit 0fd0582514
2 changed files with 12 additions and 0 deletions

View file

@ -1342,6 +1342,9 @@ static int node_demarshal_send_command(void *object, const struct pw_protocol_na
SPA_POD_Pod(&command)) < 0)
return -EINVAL;
if (command == NULL)
return -EINVAL;
return pw_resource_notify(resource, struct pw_node_methods, send_command, 0, command);
}