From 66b9d4c7a041d75811b35e7bed0f111914b9397c Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Thu, 15 Sep 2011 01:21:33 -0300 Subject: [PATCH] avrcp: fix missing error code --- audio/avrcp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/audio/avrcp.c b/audio/avrcp.c index c9eae6e0d..9b1d797d1 100644 --- a/audio/avrcp.c +++ b/audio/avrcp.c @@ -1228,8 +1228,10 @@ 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 + 3 < AVRCP_HEADER_LENGTH) { + pdu->params[0] = E_INVALID_COMMAND; goto err_metadata; + } for (handler = handlers; handler; handler++) { if (handler->pdu_id == pdu->pdu_id) -- 2.47.3