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

Commit 4f112485 authored by Hansong Zhang's avatar Hansong Zhang Committed by Myles Watson
Browse files

DO NOT MERGE: BTA_HH_LE: Check nullptr

Bug: 179162240
Change-Id: Id1ef400a596d7a22492b30e36c4dd7f96054cab7
Tag: #security
Test: manual
Merged-In: Id1ef400a596d7a22492b30e36c4dd7f96054cab7
parent c4f44264
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1780,6 +1780,9 @@ static void write_report_cb(uint16_t conn_id, tGATT_STATUS status,

  const gatt::Characteristic* p_char =
      BTA_GATTC_GetCharacteristic(conn_id, handle);

  if (p_char == nullptr) return;

  uint16_t uuid = p_char->uuid.As16Bit();
  if (uuid != GATT_UUID_HID_REPORT && uuid != GATT_UUID_HID_BT_KB_INPUT &&
      uuid != GATT_UUID_HID_BT_MOUSE_INPUT &&