summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Pawlowski <jpawlowski@google.com>2017-10-13 09:51:06 -0700
committerJakub Pawlowski <jpawlowski@google.com>2017-10-13 13:00:05 -0700
commitaad2686274783a229c8642db5fec4727c3ab292b (patch)
treeaa03483c13dc9213149e53648c4a0352fb775ea4
parent00c4f653cd0b0f4f86361a862d3fe7f00f9bcb8c (diff)
downloadandroid_system_bt-aad2686274783a229c8642db5fec4727c3ab292b.tar.gz
android_system_bt-aad2686274783a229c8642db5fec4727c3ab292b.tar.bz2
android_system_bt-aad2686274783a229c8642db5fec4727c3ab292b.zip
Fix crash in l2cble_start_conn_update
Bug: 67774334 Test: compilation Change-Id: I42ec986c6c5f3fe81f507596bf1df05dcf3ec0ba (cherry picked from 5e8d54e6c26c3bc8ced932bb9c455bbbad57a9db)
-rw-r--r--stack/l2cap/l2c_ble.cc4
1 files changed, 4 insertions, 0 deletions
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