summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorƁukasz Rymanowski <lukasz.rymanowski@codecoup.pl>2023-03-12 00:36:40 +0100
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2023-03-14 12:48:46 -0700
commit6ae44c74aaf93468ddc626a02b8f0420a808b13e (patch)
treec497f98fe500fe93143ac62209d03beeb388f425 /src/shared
parent7b654b16fb04431178c13f96ec163779e3cfd752 (diff)
downloadbluez-6ae44c74aaf93468ddc626a02b8f0420a808b13e.tar.gz
btmon: Fix decoding truncated data
Some platforms use different filtering and for this purpose, some of the ACL/SCO/ISO/SDP data is truncated. In such a case, included length is smaller than the original size. Without this fix, btmon stops working after first truncated packet.
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/btsnoop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/btsnoop.c b/src/shared/btsnoop.c
index 0a68282bc..8b93203b3 100644
--- a/src/shared/btsnoop.c
+++ b/src/shared/btsnoop.c
@@ -513,7 +513,7 @@ bool btsnoop_read_hci(struct btsnoop *btsnoop, struct timeval *tv,
return false;
}
- toread = be32toh(pkt.size);
+ toread = be32toh(pkt.len);
if (toread > BTSNOOP_MAX_PACKET_SIZE) {
btsnoop->aborted = true;
return false;