diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-09-02 17:01:24 -0700 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-09-02 17:08:18 -0700 |
commit | 8891babcf41962c11fc19bc240ddbb89cc6e6c99 (patch) | |
tree | 29645edd961756ebde27e4d89a633e263725f9b6 /monitor/rfcomm.c | |
parent | 355d06b3f32147c1dfa39bfd1cd2d4e346b65492 (diff) | |
download | bluez-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.c | 2 |
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); } |