Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f36942a0 authored by Chienyuan's avatar Chienyuan
Browse files

Fix crash in bta_ag_parse_biev_response

Bug: 109838296
Test: Poc
Change-Id: I5d18ff546388645cbd2d545516467482af6999df
parent e702e71b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -782,9 +782,11 @@ static void bta_ag_bind_response(tBTA_AG_SCB* p_scb, uint8_t arg_type) {
 ******************************************************************************/
static bool bta_ag_parse_biev_response(tBTA_AG_SCB* p_scb, tBTA_AG_VAL* val) {
  char* p_token = strtok(val->str, ",");
  if (p_token == nullptr) return false;
  uint16_t rcv_ind_id = atoi(p_token);

  p_token = strtok(nullptr, ",");
  if (p_token == nullptr) return false;
  uint16_t rcv_ind_val = atoi(p_token);

  APPL_TRACE_DEBUG("%s BIEV indicator id %d, value %d", __func__, rcv_ind_id,