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

Commit f2cdd5ac authored by jonerlin's avatar jonerlin
Browse files

Add protection to prevent null pointer dereference.

* Potential null pointer dereference risk to cause Bluetooth native
crash.

Bug: 144102387
Test: Pair with BLE device
Change-Id: I1986899a3f4e472a68a589fa2465118d66a27915
parent 25c20d06
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -826,7 +826,8 @@ void btm_use_preferred_conn_params(const RawAddress& bda) {
  tBTM_SEC_DEV_REC* p_dev_rec = btm_find_or_alloc_dev(bda);

  /* If there are any preferred connection parameters, set them now */
  if ((p_dev_rec->conn_params.min_conn_int >= BTM_BLE_CONN_INT_MIN) &&
  if ((p_lcb != NULL) && (p_dev_rec != NULL) &&
      (p_dev_rec->conn_params.min_conn_int >= BTM_BLE_CONN_INT_MIN) &&
      (p_dev_rec->conn_params.min_conn_int <= BTM_BLE_CONN_INT_MAX) &&
      (p_dev_rec->conn_params.max_conn_int >= BTM_BLE_CONN_INT_MIN) &&
      (p_dev_rec->conn_params.max_conn_int <= BTM_BLE_CONN_INT_MAX) &&