When calling getsockopt for BT_ISO_BASE, this initializes the length argument to the maximum size of the buffer where the bytes are placed. This fixes the fact that, on a Broadcast Sink, if the BASE discovered from a Broadcast Source exceeds a certain length, the bytes will be incompletely read, causing issues when parsing the LTVs. --- btio/btio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/btio/btio.c b/btio/btio.c index 2d277e409..f32fbd509 100644 --- a/btio/btio.c +++ b/btio/btio.c @@ -5,7 +5,7 @@ * * Copyright (C) 2009-2010 Marcel Holtmann <marcel@xxxxxxxxxxxx> * Copyright (C) 2009-2010 Nokia Corporation - * Copyright 2023-2024 NXP + * Copyright 2023-2025 NXP * * */ @@ -1654,6 +1654,7 @@ static gboolean iso_get(int sock, GError **err, BtIOOption opt1, va_list args) return FALSE; } + len = BASE_MAX_LENGTH; if (getsockopt(sock, SOL_BLUETOOTH, BT_ISO_BASE, &base.base, &len) < 0) { ERROR_FAILED(err, "getsockopt(BT_ISO_BASE)", errno); -- 2.43.0