From 5e8d54e6c26c3bc8ced932bb9c455bbbad57a9db Mon Sep 17 00:00:00 2001 From: Jakub Pawlowski Date: Fri, 13 Oct 2017 09:51:06 -0700 Subject: [PATCH] Fix crash in l2cble_start_conn_update Bug: 67774334 Test: compilation Change-Id: I42ec986c6c5f3fe81f507596bf1df05dcf3ec0ba --- stack/l2cap/l2c_ble.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stack/l2cap/l2c_ble.cc b/stack/l2cap/l2c_ble.cc index f611b7887..6c7820f66 100644 --- a/stack/l2cap/l2c_ble.cc +++ b/stack/l2cap/l2c_ble.cc @@ -447,6 +447,10 @@ void l2cble_conn_comp(uint16_t handle, uint8_t role, const RawAddress& bda, static void l2cble_start_conn_update(tL2C_LCB* p_lcb) { uint16_t min_conn_int, max_conn_int, slave_latency, supervision_tout; tACL_CONN* p_acl_cb = btm_bda_to_acl(p_lcb->remote_bd_addr, BT_TRANSPORT_LE); + if (!p_acl_cb) { + LOG(ERROR) << "No known connection ACL for " << p_lcb->remote_bd_addr; + return; + } // TODO(armansito): The return value of this call wasn't being used but the // logic of this function might be depending on its side effects. We should -- 2.11.0