All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] profiles/avrcp: Fix AVRCP PDU parameters length don't match
@ 2025-03-19 12:11 Frédéric Danis
  2025-03-19 13:27 ` [BlueZ] " bluez.test.bot
  2025-03-19 20:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Frédéric Danis @ 2025-03-19 12:11 UTC (permalink / raw)
  To: linux-bluetooth

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.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-03-19 19:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-19 12:11 [PATCH BlueZ] profiles/avrcp: Fix AVRCP PDU parameters length don't match Frédéric Danis
2025-03-19 13:27 ` [BlueZ] " bluez.test.bot
2025-03-19 20:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.