From 2e762ae3f7e736aef7c38100b6e68f0bcfc47a12 Mon Sep 17 00:00:00 2001 From: zhanghaipeng Date: Thu, 26 Oct 2023 19:21:21 +0800 Subject: [PATCH] fix(bt/bluedroid): Fix key size check in BLE smp --- components/bt/host/bluedroid/bta/dm/bta_dm_co.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/host/bluedroid/bta/dm/bta_dm_co.c b/components/bt/host/bluedroid/bta/dm/bta_dm_co.c index caf5e6872e..c6b62f3a6f 100644 --- a/components/bt/host/bluedroid/bta/dm/bta_dm_co.c +++ b/components/bt/host/bluedroid/bta/dm/bta_dm_co.c @@ -356,7 +356,7 @@ void bta_dm_co_ble_io_req(BD_ADDR bd_addr, tBTA_IO_CAP *p_io_cap, *p_resp_key = bte_appl_cfg.ble_resp_key; } - if (bte_appl_cfg.ble_max_key_size > 7 && bte_appl_cfg.ble_max_key_size <= 16) { + if (bte_appl_cfg.ble_max_key_size >= 7 && bte_appl_cfg.ble_max_key_size <= 16) { *p_max_key_size = bte_appl_cfg.ble_max_key_size; } #endif ///SMP_INCLUDED == TRUE