Skip to content

Commit 3e0545f

Browse files
committed
Merge branch 'bugfix/fix_bt_security' into 'master'
fix(bt/bluedroid): Fix the boundary conditions when checking EIR data See merge request espressif/esp-idf!42253
2 parents 4e62b0e + 743036a commit 3e0545f

File tree

1 file changed

+1
-1
lines changed
  • components/bt/host/bluedroid/stack/btm

1 file changed

+1
-1
lines changed

components/bt/host/bluedroid/stack/btm/btm_inq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2450,7 +2450,7 @@ UINT8 *BTM_CheckEirData( UINT8 *p_eir, UINT8 type, UINT8 *p_length )
24502450

24512451
/* Break loop if eir data is in an incorrect format,
24522452
as it may lead to memory overflow */
2453-
if ( p >= p_eir + HCI_EXT_INQ_RESPONSE_LEN ) {
2453+
if ( p >= p_eir + HCI_EXT_INQ_RESPONSE_LEN - 1 ) {
24542454
break;
24552455
}
24562456

0 commit comments

Comments
 (0)