Skip to content

Commit a10cb58

Browse files
cvinayakcarlescufi
authored andcommitted
Bluetooth: Controller: Fix out-of-bound memory write
Fix out-of-bound memory write during mem_init due to regression introduced in commit c6750de ("Bluetooth: Controller: Fix missing ISOAL sink destroy"). Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent 845a200 commit a10cb58

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

subsys/bluetooth/controller/ll_sw/ull_iso.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ static int init_reset(void);
6565
/* Allocate data path pools for RX/TX directions for each stream */
6666
#define BT_CTLR_ISO_STREAMS ((2 * (BT_CTLR_CONN_ISO_STREAMS)) + \
6767
BT_CTLR_SYNC_ISO_STREAMS)
68+
#if BT_CTLR_ISO_STREAMS
6869
static struct ll_iso_datapath datapath_pool[BT_CTLR_ISO_STREAMS];
70+
#endif /* BT_CTLR_ISO_STREAMS */
6971

7072
static void *datapath_free;
7173

@@ -838,9 +840,11 @@ static int init_reset(void)
838840
CONFIG_BT_CTLR_ISO_TX_BUFFERS, &mem_link_tx.free);
839841
#endif /* CONFIG_BT_CTLR_ADV_ISO || CONFIG_BT_CTLR_CONN_ISO */
840842

843+
#if BT_CTLR_ISO_STREAMS
841844
/* Initialize ISO Datapath pool */
842845
mem_init(datapath_pool, sizeof(struct ll_iso_datapath),
843846
sizeof(datapath_pool) / sizeof(struct ll_iso_datapath), &datapath_free);
847+
#endif /* BT_CTLR_ISO_STREAMS */
844848

845849
return 0;
846850
}

0 commit comments

Comments
 (0)