Diff between 1aea87bb34bde9a7545e65cd5a26273de2e3b0f8 and c64b4d9e8dc3e36672061f39a9dba19ad0fb1ef1

Changed Files

File Additions Deletions Status
monitor/avctp.c +3 -4 modified

Full Patch

diff --git a/monitor/avctp.c b/monitor/avctp.c
index 7f337a8..de8c345 100644
--- a/monitor/avctp.c
+++ b/monitor/avctp.c
@@ -1985,8 +1985,7 @@ static bool avrcp_attribute_entry_list(struct avctp_frame *avctp_frame,
 
 	for (; count > 0; count--) {
 		uint32_t attr;
-		uint16_t charset;
-		uint8_t len;
+		uint16_t charset, len;
 
 		if (!l2cap_frame_get_be32(frame, &attr))
 			return false;
@@ -2000,10 +1999,10 @@ static bool avrcp_attribute_entry_list(struct avctp_frame *avctp_frame,
 		print_field("%*cCharsetID: 0x%04x (%s)", indent, ' ',
 						charset, charset2str(charset));
 
-		if (!l2cap_frame_get_u8(frame, &len))
+		if (!l2cap_frame_get_be16(frame, &len))
 			return false;
 
-		print_field("%*cAttributeLength: 0x%02x (%u)", indent, ' ',
+		print_field("%*cAttributeLength: 0x%04x (%u)", indent, ' ',
 						len, len);
 
 		printf("%*cAttributeValue: ", indent+8, ' ');