mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
bluez5: better error/malformed input handling
Safer parsing of AT commands, additional null and error checks.
This commit is contained in:
parent
f0a2b6d01f
commit
f330446291
5 changed files with 56 additions and 21 deletions
|
|
@ -1474,6 +1474,9 @@ static int impl_set_param(void *object,
|
|||
uint32_t profile;
|
||||
enum spa_bluetooth_audio_codec codec;
|
||||
|
||||
if (param == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
if ((res = spa_pod_parse_object(param,
|
||||
SPA_TYPE_OBJECT_ParamProfile, NULL,
|
||||
SPA_PARAM_PROFILE_index, SPA_POD_Int(&id))) < 0) {
|
||||
|
|
@ -1496,6 +1499,9 @@ static int impl_set_param(void *object,
|
|||
struct spa_pod *props = NULL;
|
||||
struct node *node;
|
||||
|
||||
if (param == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
if ((res = spa_pod_parse_object(param,
|
||||
SPA_TYPE_OBJECT_ParamRoute, NULL,
|
||||
SPA_PARAM_ROUTE_index, SPA_POD_Int(&id),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue