aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-m2tp.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-06-06 10:35:50 -0400
committerPascal Quantin <pascal.quantin@gmail.com>2014-06-07 15:41:07 +0000
commit73217d9f3fbff3d9f5a514cd7f2b7f4ca5f61947 (patch)
tree194ce9f6db1db1237a755f832d34367d2df8320b /epan/dissectors/packet-m2tp.c
parenta048dc1d0d33728022831a538d878e967da88901 (diff)
tvb_new_subset -> tvb_new_subset_length when length parameters are equal.
tvb_new_subset -> tvb_new_subset_remaining it appears that's what the intention is. Change-Id: I2334bbf3f10475b3c22391392fc8b6864454de2d Reviewed-on: https://code.wireshark.org/review/1999 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-m2tp.c')
-rw-r--r--epan/dissectors/packet-m2tp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-m2tp.c b/epan/dissectors/packet-m2tp.c
index a8880459dc..025a4f2b27 100644
--- a/epan/dissectors/packet-m2tp.c
+++ b/epan/dissectors/packet-m2tp.c
@@ -406,7 +406,7 @@ dissect_m2tp_protocol_data_parameter(tvbuff_t *parameter_tvb, proto_tree *parame
padding_length = nr_of_padding_bytes(length);
protocol_data_length = length - PARAMETER_HEADER_LENGTH;
- mtp2_tvb = tvb_new_subset(parameter_tvb, PARAMETER_VALUE_OFFSET, protocol_data_length, protocol_data_length);
+ mtp2_tvb = tvb_new_subset_length(parameter_tvb, PARAMETER_VALUE_OFFSET, protocol_data_length);
call_dissector(mtp2_handle, mtp2_tvb, pinfo, tree);
if (parameter_tree) {
@@ -507,7 +507,7 @@ dissect_m2tp_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_item *m2tp
offset = 0;
/* extract and process the common header */
- common_header_tvb = tvb_new_subset(message_tvb, offset, COMMON_HEADER_LENGTH, COMMON_HEADER_LENGTH);
+ common_header_tvb = tvb_new_subset_length(message_tvb, offset, COMMON_HEADER_LENGTH);
dissect_m2tp_common_header(common_header_tvb, pinfo, m2tp_tree);
offset += COMMON_HEADER_LENGTH;
@@ -517,7 +517,7 @@ dissect_m2tp_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_item *m2tp
padding_length = nr_of_padding_bytes(length);
total_length = length + padding_length;
/* create a tvb for the parameter including the padding bytes */
- parameter_tvb = tvb_new_subset(message_tvb, offset, total_length, total_length);
+ parameter_tvb = tvb_new_subset_length(message_tvb, offset, total_length);
dissect_m2tp_parameter(parameter_tvb, pinfo, m2tp_tree, m2tp_item, tree);
/* get rid of the handled parameter */
offset += total_length;