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

Commit fd1d5e71 authored by Brian Delwiche's avatar Brian Delwiche Committed by Android (Google) Code Review
Browse files

Merge "Fix OOB read in btm_ble_periodic_av_sync_lost" into tm-dev

parents f173fcb4 c077ffbe
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1165,6 +1165,10 @@ void btm_ble_periodic_adv_sync_lost(uint16_t sync_handle) {
  LOG_DEBUG("[PSync]: sync_handle = %d", sync_handle);

  int index = btm_ble_get_psync_index_from_handle(sync_handle);
  if (index == MAX_SYNC_TRANSACTION) {
    LOG_ERROR("[PSync]: index not found for handle %u", sync_handle);
    return;
  }
  tBTM_BLE_PERIODIC_SYNC* ps = &btm_ble_pa_sync_cb.p_sync[index];
  ps->sync_lost_cb.Run(sync_handle);