mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-30 16:20:24 +00:00
sm: fix storing of bonding infomation for LE Legacy Pairing. Bug introduced in 4c1d10929
This commit is contained in:
parent
98d95509d1
commit
7a2e63879d
@ -3435,7 +3435,7 @@ static const uint8_t sm_pdu_size[] = {
|
|||||||
17, // 0x04 pairing random
|
17, // 0x04 pairing random
|
||||||
2, // 0x05 pairing failed
|
2, // 0x05 pairing failed
|
||||||
17, // 0x06 encryption information
|
17, // 0x06 encryption information
|
||||||
8, // 0x07 master identification
|
11, // 0x07 master identification
|
||||||
17, // 0x08 identification information
|
17, // 0x08 identification information
|
||||||
8, // 0x09 identify address information
|
8, // 0x09 identify address information
|
||||||
17, // 0x0a signing information
|
17, // 0x0a signing information
|
||||||
@ -3458,7 +3458,7 @@ static void sm_pdu_handler(uint8_t packet_type, hci_con_handle_t con_handle, uin
|
|||||||
|
|
||||||
// validate pdu size
|
// validate pdu size
|
||||||
if (sm_pdu_code >= sizeof(sm_pdu_size)) return;
|
if (sm_pdu_code >= sizeof(sm_pdu_size)) return;
|
||||||
if (sm_pdu_size[sm_pdu_code] < size) return;
|
if (sm_pdu_size[sm_pdu_code] != size) return;
|
||||||
|
|
||||||
sm_connection_t * sm_conn = sm_get_connection_for_handle(con_handle);
|
sm_connection_t * sm_conn = sm_get_connection_for_handle(con_handle);
|
||||||
if (!sm_conn) return;
|
if (!sm_conn) return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user