summaryrefslogtreecommitdiff
path: root/monitor/rfcomm.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2021-09-02 17:01:24 -0700
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2021-09-02 17:08:18 -0700
commit8891babcf41962c11fc19bc240ddbb89cc6e6c99 (patch)
tree29645edd961756ebde27e4d89a633e263725f9b6 /monitor/rfcomm.c
parent355d06b3f32147c1dfa39bfd1cd2d4e346b65492 (diff)
downloadbluez-8891babcf41962c11fc19bc240ddbb89cc6e6c99.tar.gz
monitor: Fix calculation of RFCOMM length
Byte order is assumed to be big endian instead of little endian.
Diffstat (limited to 'monitor/rfcomm.c')
-rw-r--r--monitor/rfcomm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/monitor/rfcomm.c b/monitor/rfcomm.c
index 3eb19faf0..41533b158 100644
--- a/monitor/rfcomm.c
+++ b/monitor/rfcomm.c
@@ -448,7 +448,7 @@ void rfcomm_packet(const struct l2cap_frame *frame)
else {
if (!l2cap_frame_get_u8(l2cap_frame, &ex_length))
goto fail;
- hdr.length = ((uint16_t)length << 8) | ex_length;
+ hdr.length = ((uint16_t)ex_length << 8) | length;
hdr.length = GET_LEN16(hdr.length);
}