From 73217d9f3fbff3d9f5a514cd7f2b7f4ca5f61947 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Fri, 6 Jun 2014 10:35:50 -0400 Subject: 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 --- epan/dissectors/packet-sccp.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'epan/dissectors/packet-sccp.c') diff --git a/epan/dissectors/packet-sccp.c b/epan/dissectors/packet-sccp.c index 2e848e2da2..ce912feb99 100644 --- a/epan/dissectors/packet-sccp.c +++ b/epan/dissectors/packet-sccp.c @@ -1269,7 +1269,7 @@ looks_like_valid_sccp(guint32 frame_num _U_, tvbuff_t *tvb, guint8 my_mtp3_stand if (param_len == 0) RETURN_FALSE; - param_tvb = tvb_new_subset(tvb, called_ptr+1, param_len, param_len); + param_tvb = tvb_new_subset_length(tvb, called_ptr+1, param_len); if (!sccp_called_calling_looks_valid(frame_num, param_tvb, my_mtp3_standard, !is_connectionless(msgtype))) RETURN_FALSE; @@ -1281,7 +1281,7 @@ looks_like_valid_sccp(guint32 frame_num _U_, tvbuff_t *tvb, guint8 my_mtp3_stand if (param_len == 0) RETURN_FALSE; - param_tvb = tvb_new_subset(tvb, calling_ptr+1, param_len, param_len); + param_tvb = tvb_new_subset_length(tvb, calling_ptr+1, param_len); if (!sccp_called_calling_looks_valid(frame_num, param_tvb, my_mtp3_standard, !is_connectionless(msgtype))) RETURN_FALSE; @@ -1770,8 +1770,7 @@ dissect_sccp_global_title(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g if (length < offset) return; - signals_tvb = tvb_new_subset(tvb, offset, (length - offset), - (length - offset)); + signals_tvb = tvb_new_subset_length(tvb, offset, (length - offset)); digits_tree = dissect_sccp_gt_address_information(signals_tvb, pinfo, gt_tree, (length - offset), @@ -2005,8 +2004,7 @@ dissect_sccp_called_calling_param(tvbuff_t *tvb, proto_tree *tree, packet_info * if (length < offset) return; - gt_tvb = tvb_new_subset(tvb, offset, (length - offset), - (length - offset)); + gt_tvb = tvb_new_subset_length(tvb, offset, (length - offset)); dissect_sccp_global_title(gt_tvb, pinfo, call_tree, (length - offset), gti, (routing_ind == ROUTE_ON_GT), called); } @@ -2071,8 +2069,7 @@ dissect_sccp_called_calling_param(tvbuff_t *tvb, proto_tree *tree, packet_info * if (gti != AI_GTI_NO_GT) { if (length < offset) return; - gt_tvb = tvb_new_subset(tvb, offset, (length - offset), - (length - offset)); + gt_tvb = tvb_new_subset_length(tvb, offset, (length - offset)); dissect_sccp_global_title(gt_tvb, pinfo, call_tree, (length - offset), gti, (routing_ind == ROUTE_ON_GT), called); } @@ -2522,7 +2519,7 @@ dissect_sccp_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree, } - parameter_tvb = tvb_new_subset(tvb, offset, parameter_length, parameter_length); + parameter_tvb = tvb_new_subset_length(tvb, offset, parameter_length); switch (parameter_type) { -- cgit v1.2.3