From 4f707f0c12b11460f3ec60226cc31cbb3b31e03c Mon Sep 17 00:00:00 2001 From: Zhang Hai Peng Date: Wed, 30 Oct 2024 15:24:52 +0800 Subject: [PATCH] fix(ble/bluedroid): Fixed crash issue in BLE SMP when a disconnection process is ongoing (cherry picked from commit 76e1650161a019bca22c2855ab37f11608f130bd) Co-authored-by: zhanghaipeng --- components/bt/host/bluedroid/stack/smp/smp_utils.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/bt/host/bluedroid/stack/smp/smp_utils.c b/components/bt/host/bluedroid/stack/smp/smp_utils.c index 2e9fac77c9..48ba6c0ae3 100644 --- a/components/bt/host/bluedroid/stack/smp/smp_utils.c +++ b/components/bt/host/bluedroid/stack/smp/smp_utils.c @@ -331,8 +331,7 @@ BOOLEAN smp_send_msg_to_L2CAP(BD_ADDR rem_bda, BT_HDR *p_toL2CAP) if ((l2cap_ret = L2CA_SendFixedChnlData (fixed_cid, rem_bda, p_toL2CAP)) == L2CAP_DW_FAILED) { smp_cb.total_tx_unacked -= 1; - SMP_TRACE_ERROR("SMP failed to pass msg:0x%0x to L2CAP", - *((UINT8 *)(p_toL2CAP + 1) + p_toL2CAP->offset)); + SMP_TRACE_ERROR("SMP failed to pass msg to L2CAP"); return FALSE; } else { return TRUE; @@ -1125,7 +1124,7 @@ BOOLEAN smp_pairing_request_response_parameters_are_valid(tSMP_CB *p_cb) SMP_TRACE_DEBUG("%s for cmd code 0x%02x\n", __func__, p_cb->rcvd_cmd_code); if (io_caps >= BTM_IO_CAP_MAX) { - SMP_TRACE_WARNING("Rcvd from the peer cmd 0x%02x with IO Capabilty \ + SMP_TRACE_WARNING("Rcvd from the peer cmd 0x%02x with IO Capability \ value (0x%02x) out of range).\n", p_cb->rcvd_cmd_code, io_caps); return FALSE;