bluez5: better error/malformed input handling

Safer parsing of AT commands, additional null and error checks.
This commit is contained in:
Pauli Virtanen 2021-03-27 13:55:01 +02:00 committed by Wim Taymans
parent f0a2b6d01f
commit f330446291
5 changed files with 56 additions and 21 deletions

View file

@ -692,7 +692,7 @@ static int impl_node_send_command(void *object, const struct spa_command *comman
static void emit_node_info(struct impl *this, bool full)
{
bool is_ag = (this->transport->profile & SPA_BT_PROFILE_HEADSET_AUDIO_GATEWAY);
bool is_ag = this->transport && (this->transport->profile & SPA_BT_PROFILE_HEADSET_AUDIO_GATEWAY);
struct spa_dict_item ag_node_info_items[] = {
{ SPA_KEY_DEVICE_API, "bluez5" },
{ SPA_KEY_MEDIA_CLASS, "Stream/Output/Audio" },