aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/file-btsnoop.c
diff options
context:
space:
mode:
authorJohn Thacker <johnthacker@gmail.com>2023-09-01 20:58:01 -0400
committerAndersBroman <a.broman58@gmail.com>2023-09-02 10:19:15 +0000
commitf2f7c7bf1c8ab1611541f2f1f84ee1e64423ba4a (patch)
treed7d7f602552a5e1d1cf3a1f73eb8a0a592c710e3 /epan/dissectors/file-btsnoop.c
parent3679783182d51ef63e4cb0694eaac81e05ea5974 (diff)
Remove some uses of tvb_new_subset_length_caplen()
These are all very obvious what was intended, and should be tvb_new_subset_length() or tvb_new_subset_remaining() instead. A few of them could throw exceptions (and sometimes the wrong exception) on packets where the captured length was not the full reported length, but for most of these this change has no effect (especially after commit 0c4dcc164be292790faa4707ccf06dfb6dc9dcb9) This makes it easier to find the calls that need fixing.
Diffstat (limited to 'epan/dissectors/file-btsnoop.c')
-rw-r--r--epan/dissectors/file-btsnoop.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/file-btsnoop.c b/epan/dissectors/file-btsnoop.c
index bca31e2395..37ad95b226 100644
--- a/epan/dissectors/file-btsnoop.c
+++ b/epan/dissectors/file-btsnoop.c
@@ -191,7 +191,7 @@ dissect_btsnoop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
pinfo->pseudo_header->bthci.channel = BTHCI_CHANNEL_ACL;
}
- next_tvb = tvb_new_subset_length_caplen(tvb, offset, length, length);
+ next_tvb = tvb_new_subset_length(tvb, offset, length);
call_dissector(hci_h1_handle, next_tvb, pinfo, payload_tree);
break;
case 1002: /* H4 */
@@ -199,7 +199,7 @@ dissect_btsnoop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
pinfo->abs_ts = timestamp;
pinfo->p2p_dir = (flags & 0x01) ? P2P_DIR_RECV : P2P_DIR_SENT;
- next_tvb = tvb_new_subset_length_caplen(tvb, offset, length, length);
+ next_tvb = tvb_new_subset_length(tvb, offset, length);
call_dissector(hci_h4_handle, next_tvb, pinfo, payload_tree);
break;
case 2001: /* Linux Monitor */
@@ -209,7 +209,7 @@ dissect_btsnoop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
pinfo->pseudo_header->btmon.opcode = flags & 0xFFFF;
pinfo->pseudo_header->btmon.adapter_id = flags >> 16;
- next_tvb = tvb_new_subset_length_caplen(tvb, offset, length, length);
+ next_tvb = tvb_new_subset_length(tvb, offset, length);
call_dissector(hci_mon_handle, next_tvb, pinfo, payload_tree);
break;