From 1ec44b616058274f471405a7d1dc6ad0ff38d7fd Mon Sep 17 00:00:00 2001 From: Andrei Emeltchenko Date: Wed, 18 Jan 2023 11:42:38 +0200 Subject: [PATCH] bluetooth: Fix using size instead of len Fix using wrong field. Signed-off-by: Andrei Emeltchenko --- subsys/bluetooth/audio/bap_scan_delegator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/bluetooth/audio/bap_scan_delegator.c b/subsys/bluetooth/audio/bap_scan_delegator.c index 983caf8e421..68abaaad14c 100644 --- a/subsys/bluetooth/audio/bap_scan_delegator.c +++ b/subsys/bluetooth/audio/bap_scan_delegator.c @@ -855,7 +855,7 @@ static int scan_delegator_mod_src(struct bt_conn *conn, /* subtract 1 as the opcode has already been pulled */ if (buf->len < sizeof(struct bt_bap_bass_cp_mod_src) - 1) { - LOG_DBG("Invalid length %u", buf->size); + LOG_DBG("Invalid length %u", buf->len); return BT_GATT_ERR(BT_ATT_ERR_INVALID_ATTRIBUTE_LEN); }