From 9822898fd5f59a255b7a957303914bc557f9cf44 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Fri, 14 Jan 2022 14:02:05 -0800 Subject: [PATCH] monitor/avctp: Fix parsing of GetElementAttribute AVRCP byte order is always big endian: Audio/Video Remote Control / Profile Specification - Page 20: 'Transfer Octet Order; Packets shall transfer multiple-octet fields in standard network octet order (Big Endian), with more significant (high-order) octets being transferred before less-significant (low-order) octets.' --- monitor/avctp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitor/avctp.c b/monitor/avctp.c index dc03195a8..fb2628282 100644 --- a/monitor/avctp.c +++ b/monitor/avctp.c @@ -1192,7 +1192,7 @@ static bool avrcp_get_element_attributes(struct avctp_frame *avctp_frame, for (; num > 0; num--) { uint32_t attr; - if (!l2cap_frame_get_le32(frame, &attr)) + if (!l2cap_frame_get_be32(frame, &attr)) return false; print_field("%*cAttributeID: 0x%08x (%s)", (indent - 8), -- 2.47.3