From 3aa07cc2ea9c8a232ff46bd6839ef5b9984c1dfc Mon Sep 17 00:00:00 2001 From: Claudia Draghicescu Date: Wed, 6 Sep 2023 14:42:34 +0300 Subject: [PATCH] btio: Fix BASE copy from getsockopt() Fix copy of BASE from getsockopt() and update base length. --- btio/btio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/btio/btio.c b/btio/btio.c index 96f0d2c..f500a23 100755 --- a/btio/btio.c +++ b/btio/btio.c @@ -1649,10 +1649,12 @@ static gboolean iso_get(int sock, GError **err, BtIOOption opt1, va_list args) return FALSE; } - if (getsockopt(sock, SOL_BLUETOOTH, BT_ISO_BASE, &base, &len) < 0) { + if (getsockopt(sock, SOL_BLUETOOTH, BT_ISO_BASE, + &base.base, &len) < 0) { ERROR_FAILED(err, "getsockopt(BT_ISO_BASE)", errno); return FALSE; } + base.base_len = len; if (!get_src(sock, &src, sizeof(src), err)) return FALSE; -- 2.7.4