From e88f914ea700dc5f67e3a260a29b592df0cf2936 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Danis?= Date: Wed, 19 Mar 2025 13:11:12 +0100 Subject: [PATCH] profiles/avrcp: Fix AVRCP PDU parameters length don't match This is required for passing PTS test case AVRCP/TG/VLH/BI-01-C (To verify the behavior of the TG receiving an invalid SetAbsoluteVolume command). --- profiles/audio/avrcp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c index 7e9a383b0..65f1adbdd 100644 --- a/profiles/audio/avrcp.c +++ b/profiles/audio/avrcp.c @@ -1963,7 +1963,8 @@ static size_t handle_vendordep_pdu(struct avctp *conn, uint8_t transaction, if (be16_to_cpu(pdu->params_len) != operand_count) { DBG("AVRCP PDU parameters length don't match"); - pdu->params_len = cpu_to_be16(operand_count); + pdu->params[0] = AVRCP_STATUS_PARAM_NOT_FOUND; + goto err_metadata; } for (handler = session->control_handlers; handler->pdu_id; handler++) { -- 2.47.3