File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
subsys/bluetooth/host/classic Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -3565,6 +3565,8 @@ static struct bt_hfp_ag *hfp_ag_create(struct bt_conn *conn)
3565
3565
}
3566
3566
3567
3567
index = (size_t )bt_conn_index (conn );
3568
+ __ASSERT (index < ARRAY_SIZE (bt_hfp_ag_pool ), "Conn index is out of bounds" );
3569
+
3568
3570
ag = & bt_hfp_ag_pool [index ];
3569
3571
if (ag -> acl_conn ) {
3570
3572
LOG_ERR ("AG connection (%p) is established" , conn );
@@ -3705,6 +3707,8 @@ static int bt_hfp_ag_sco_accept(const struct bt_sco_accept_info *info,
3705
3707
LOG_DBG ("conn %p" , info -> acl );
3706
3708
3707
3709
index = (size_t )bt_conn_index (info -> acl );
3710
+ __ASSERT (index < ARRAY_SIZE (bt_hfp_ag_pool ), "Conn index is out of bounds" );
3711
+
3708
3712
ag = & bt_hfp_ag_pool [index ];
3709
3713
if (ag -> acl_conn != info -> acl ) {
3710
3714
LOG_ERR ("ACL %p of AG is unaligned with SCO's %p" , ag -> acl_conn , info -> acl );
You can’t perform that action at this time.
0 commit comments