Commit 9341a3d5 authored by Emil Gydesen's avatar Emil Gydesen Committed by Anas Nashif
Browse files

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: default avatarEmil Gydesen <emil.gydesen@nordicsemi.no>
parent 581d07e4
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1781,6 +1781,13 @@ int bt_iso_big_sync(struct bt_le_per_adv_sync *sync, struct bt_iso_big_sync_para
		return -EINVAL;
	}

	for (int i = 0; i < param->num_bis; i++) {
		if (param->bis_channels[i] == NULL) {
			BT_DBG("NULL channel in bis_channels[%d]", i);
			return -EINVAL;
		}
	}

	big = get_free_big();

	if (!big) {