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

Commit 04fd0b45 authored by Chris Manton's avatar Chris Manton
Browse files

legacy: Check resolving list max size before using it

Bug: 206736603
Tag: #refactor
Test: gd/cert/run
Change-Id: I7ec6091159f16af560cf71d53c4fe66e10c1b05b
parent ee9f5c59
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -657,6 +657,11 @@ static bool is_peer_identity_key_valid(const tBTM_SEC_DEV_REC& dev_rec) {
static Octet16 get_local_irk() { return btm_cb.devcb.id_keys.irk; }

void btm_ble_resolving_list_load_dev(tBTM_SEC_DEV_REC& dev_rec) {
  if (controller_get_interface()->get_ble_resolving_list_max_size() == 0) {
    LOG_INFO("Controller does not support RPA offloading or privacy 1.2");
    return;
  }

  if (!controller_get_interface()->supports_ble_privacy()) {
    return btm_ble_ble_unsupported_resolving_list_load_dev(&dev_rec);
  }