mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
bluez5: fix some coverity issues
Missing null pointer checks, wrong array indices, uninitialized/unused variables.
This commit is contained in:
parent
26b09b0ee3
commit
7f2bdab8ea
5 changed files with 7 additions and 9 deletions
|
|
@ -4204,7 +4204,7 @@ static int transport_set_delay(void *data, int64_t delay_nsec)
|
|||
if (!(transport->profile & SPA_BT_PROFILE_A2DP_DUPLEX))
|
||||
return -ENOTSUP;
|
||||
|
||||
value = SPA_CLAMP(delay_nsec / (100 * SPA_NSEC_PER_USEC), 0, 10 * UINT16_MAX);
|
||||
value = SPA_CLAMP(delay_nsec / (100 * SPA_NSEC_PER_USEC), 0, UINT16_MAX);
|
||||
|
||||
if (transport->delay_us == 100 * value)
|
||||
return 0;
|
||||
|
|
@ -4362,7 +4362,7 @@ static bool codec_switch_check_endpoint(struct spa_bt_remote_endpoint *ep,
|
|||
spa_autofree char *path = NULL;
|
||||
uint32_t ep_profile;
|
||||
|
||||
if (!ep->uuid || !ep->device)
|
||||
if (!ep || !ep->uuid || !ep->device)
|
||||
return false;
|
||||
|
||||
ep_profile = spa_bt_profile_from_uuid(ep->uuid);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue