Skip to content

Commit 9341a3d

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

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
@@ -1781,6 +1781,13 @@ int bt_iso_big_sync(struct bt_le_per_adv_sync *sync, struct bt_iso_big_sync_para
17811781
return -EINVAL;
17821782
}
17831783

1784+
for (int i = 0; i < param->num_bis; i++) {
1785+
if (param->bis_channels[i] == NULL) {
1786+
BT_DBG("NULL channel in bis_channels[%d]", i);
1787+
return -EINVAL;
1788+
}
1789+
}
1790+
17841791
big = get_free_big();
17851792

17861793
if (!big) {

0 commit comments

Comments
 (0)