Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15-SP4
bluez.30124
audio-avrcp-Use-host-network-order-as-appropria...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File audio-avrcp-Use-host-network-order-as-appropriate-fo.patch of Package bluez.30124
From e21680c9355a0f9d5ef6d4a5ae032de274e87b37 Mon Sep 17 00:00:00 2001 From: Marijn Suijten <marijn.suijten@somainline.org> Date: Sun, 8 Aug 2021 16:35:26 +0200 Subject: [PATCH] audio/avrcp: Use host/network order as appropriate for pdu->params_len When comparing against or writing to pdu->params_len to enforce matching length with total packet length, take into account that pdu->params_len is in network order (big endian) while packet size (operand_count) is in host order (usually little endian). This silently breaks a number of AVRCP commands that perform a quick length check based on params_len and bail if it doesn't match exactly. Fixes: e2b0f0d8d ("avrcp: Fix not checking if params_len match number of received bytes") --- profiles/audio/avrcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Index: bluez-5.48/profiles/audio/avrcp.c =================================================================== --- bluez-5.48.orig/profiles/audio/avrcp.c +++ bluez-5.48/profiles/audio/avrcp.c @@ -1847,9 +1847,9 @@ static size_t handle_vendordep_pdu(struc operands += sizeof(*pdu); operand_count -= sizeof(*pdu); - if (pdu->params_len != operand_count) { + if (ntohs(pdu->params_len) != 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++) {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor