Commit 581d07e4 authored by Emil Gydesen's avatar Emil Gydesen Committed by Anas Nashif
Browse files

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: default avatarEmil Gydesen <emil.gydesen@nordicsemi.no>
parent 06ebe239
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1446,6 +1446,13 @@ int bt_iso_big_create(struct bt_le_ext_adv *padv, struct bt_iso_big_create_param
		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) {