Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -1165,6 +1165,10 @@ void btm_ble_periodic_adv_sync_lost(uint16_t sync_handle) { ...@@ -1165,6 +1165,10 @@ void btm_ble_periodic_adv_sync_lost(uint16_t sync_handle) {
LOG_DEBUG("[PSync]: sync_handle = %d", sync_handle); LOG_DEBUG("[PSync]: sync_handle = %d", sync_handle);
int index = btm_ble_get_psync_index_from_handle(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]; tBTM_BLE_PERIODIC_SYNC* ps = &btm_ble_pa_sync_cb.p_sync[index];
ps->sync_lost_cb.Run(sync_handle); ps->sync_lost_cb.Run(sync_handle);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment