Message ID | 20210608103940.BlueZ.v1.1.Ifed45e2dfac25b2627fcaabc66cd29f6894ba07b@changeid |
---|---|
State | New |
Headers | show |
Series | [BlueZ,v1] avrcp: fix byte order of PDU parameter length compare | expand |
diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c index ccf34b220..2265f87ab 100644 --- a/profiles/audio/avrcp.c +++ b/profiles/audio/avrcp.c @@ -1923,9 +1923,9 @@ static size_t handle_vendordep_pdu(struct avctp *conn, uint8_t transaction, operands += sizeof(*pdu); operand_count -= sizeof(*pdu); - if (pdu->params_len != operand_count) { + if (pdu->params_len != htons(operand_count)) { DBG("AVRCP PDU parameters length don't match"); - pdu->params_len = operand_count; + pdu->params_len = htons(operand_count); } for (handler = session->control_handlers; handler->pdu_id; handler++) {