protocol: don't allow NULL event or command
If causes crashes when the handlers try to get the ID.
This commit is contained in:
parent
4ef891b047
commit
0fd0582514
|
@ -412,6 +412,9 @@ static int client_node_demarshal_event_event(void *data, const struct pw_protoco
|
|||
SPA_POD_PodObject(&event)) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
if (event == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
pw_proxy_notify(proxy, struct pw_client_node_events, event, 0, event);
|
||||
return 0;
|
||||
}
|
||||
|
@ -427,6 +430,9 @@ static int client_node_demarshal_command(void *data, const struct pw_protocol_na
|
|||
SPA_POD_PodObject(&command)) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
if (command == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
pw_proxy_notify(proxy, struct pw_client_node_events, command, 0, command);
|
||||
return 0;
|
||||
}
|
||||
|
@ -1097,6 +1103,9 @@ static int client_node_demarshal_event_method(void *object, const struct pw_prot
|
|||
SPA_POD_PodObject(&event)) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
if (event == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
pw_resource_notify(resource, struct pw_client_node_methods, event, 0, event);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue