bluetooth: Fix using size instead of len

Fix using wrong field.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit is contained in:
Andrei Emeltchenko 2023-01-18 11:42:38 +02:00 committed by Anas Nashif
commit 1ec44b6160

View file

@ -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);
}