From 26204a61ebbc7006ff7868cddaa87d91eae47a4b Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Wed, 26 Oct 2011 11:02:25 -0200 Subject: [PATCH] Fix check for PDU size Company ID became part of the avrcp header so its size is already accounted in the AVRCP_HEADER_LENGTH define. --- audio/avrcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/avrcp.c b/audio/avrcp.c index f06afbf0c..879e9594f 100644 --- a/audio/avrcp.c +++ b/audio/avrcp.c @@ -1053,7 +1053,7 @@ static size_t handle_vendordep_pdu(struct avctp *session, uint8_t transaction, pdu->packet_type = 0; pdu->rsvd = 0; - if (operand_count + 3 < AVRCP_HEADER_LENGTH) { + if (operand_count < AVRCP_HEADER_LENGTH) { pdu->params[0] = E_INVALID_COMMAND; goto err_metadata; } -- 2.47.3