Skip to content

Commit 581d07e

Browse files
Thalleynashif
authored andcommitted
Bluetooth: ISO: Add NULL check in bt_iso_big_create
Verify that the ISO channels supplied by the caller are non-NULL. Signed-off-by: Emil Gydesen <[email protected]>
1 parent 06ebe23 commit 581d07e

File tree

1 file changed

+7
-0
lines changed
  • subsys/bluetooth/host

1 file changed

+7
-0
lines changed

subsys/bluetooth/host/iso.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,6 +1446,13 @@ int bt_iso_big_create(struct bt_le_ext_adv *padv, struct bt_iso_big_create_param
14461446
return -EINVAL;
14471447
}
14481448

1449+
for (int i = 0; i < param->num_bis; i++) {
1450+
if (param->bis_channels[i] == NULL) {
1451+
BT_DBG("NULL channel in bis_channels[%d]", i);
1452+
return -EINVAL;
1453+
}
1454+
}
1455+
14491456
big = get_free_big();
14501457

14511458
if (!big) {

0 commit comments

Comments
 (0)