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.
This commit is contained in:
Lucas De Marchi 2011-10-26 11:02:25 -02:00 committed by Johan Hedberg
parent 24deedd46b
commit 26204a61eb

View File

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