From 04d6936ce1ff381ae00a52c1f6fb3c71fd5e03d8 Mon Sep 17 00:00:00 2001 From: zhanghaipeng Date: Tue, 22 Aug 2023 19:38:01 +0800 Subject: [PATCH] fix(bt): Fix bug while calculating block cipher using aes-128 --- components/bt/host/bluedroid/stack/smp/smp_cmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/host/bluedroid/stack/smp/smp_cmac.c b/components/bt/host/bluedroid/stack/smp/smp_cmac.c index 391f538353..e47c56b71f 100644 --- a/components/bt/host/bluedroid/stack/smp/smp_cmac.c +++ b/components/bt/host/bluedroid/stack/smp/smp_cmac.c @@ -133,7 +133,7 @@ static void cmac_aes_cleanup(void) static BOOLEAN cmac_aes_k_calculate(BT_OCTET16 key, UINT8 *p_signature, UINT16 tlen) { tSMP_ENC output; - UINT8 i = 1, err = 0; + UINT16 i = 1, err = 0; UINT8 x[16] = {0}; UINT8 *p_mac;