summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-gprs-llc.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-03-01 21:40:18 -0800
committerGuy Harris <guy@alum.mit.edu>2016-03-02 05:41:11 +0000
commiteb37018610669eb776b015c8903ddd4b7ebb6099 (patch)
treec8a0d84369e518a2084d92392bc438f9efd0d40a /epan/dissectors/packet-gprs-llc.c
parent83a7afd067b390c8d2fbb8bc43aabd8cae98aad6 (diff)
downloadwireshark-eb37018610669eb776b015c8903ddd4b7ebb6099.tar.gz
Universally use tvb_new_subset_length() rather than tvb_new_subset().
Leave the job of computing the captured length up to the tvbuff code. Change-Id: If88e813ba7dee3516baf958b9fead26374d915ad Reviewed-on: https://code.wireshark.org/review/14276 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-gprs-llc.c')
-rw-r--r--epan/dissectors/packet-gprs-llc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-gprs-llc.c b/epan/dissectors/packet-gprs-llc.c
index dbd3e796fc..e5ccc4576e 100644
--- a/epan/dissectors/packet-gprs-llc.c
+++ b/epan/dissectors/packet-gprs-llc.c
@@ -767,7 +767,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
else
{
/* otherwise - call a subdissector */
- next_tvb = tvb_new_subset(tvb, offset, (llc_data_captured_length-offset), (llc_data_length-offset));
+ next_tvb = tvb_new_subset_length(tvb, offset, (llc_data_length-offset));
if (!dissector_try_uint(llcgprs_subdissector_table, sapi, next_tvb, pinfo, tree))
/* if no subdissector is found, call the data dissector */
{
@@ -890,7 +890,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
else if (llc_data_length>offset)
{
/* otherwise - call a subdissector */
- next_tvb = tvb_new_subset(tvb, offset, (llc_data_captured_length-offset), (llc_data_length-offset));
+ next_tvb = tvb_new_subset_length(tvb, offset, (llc_data_length-offset));
if (!dissector_try_uint(llcgprs_subdissector_table, sapi, next_tvb, pinfo, tree))
{
call_dissector(data_handle, next_tvb, pinfo, tree);
@@ -921,7 +921,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
}
/* MLT CHANGES - TOM parsing added */
- next_tvb = tvb_new_subset(tvb, offset, (llc_data_captured_length-offset), (llc_data_length-offset));
+ next_tvb = tvb_new_subset_length(tvb, offset, (llc_data_length-offset));
if ((ignore_cipher_bit && (fcs_status == FCS_VALID)) || !(epm & 0x2))
{