From 45734349087e909aa5cfb7149da2dd6c1d739bb9 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Sun, 8 Jun 2025 23:31:03 +0300 Subject: [PATCH] shared/bap: check lpac type in bap_bcast_stream_new() bap_bcast_stream_new() shall refuse to create streams if lpac is not of broadcast type. --- src/shared/bap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/shared/bap.c b/src/shared/bap.c index f0c6f6485..854855f6b 100644 --- a/src/shared/bap.c +++ b/src/shared/bap.c @@ -6155,6 +6155,8 @@ static struct bt_bap_stream *bap_bcast_stream_new(struct bt_bap *bap, ep = queue_find(bap->remote_eps, find_ep_source, NULL); if (!ep) return NULL; + } else if (lpac->type != BT_BAP_BCAST_SINK) { + return NULL; } if (!stream) -- 2.47.3