aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-cip.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-cip.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-cip.c')
-rw-r--r--epan/dissectors/packet-cip.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-cip.c b/epan/dissectors/packet-cip.c
index c1b29232eb..303ef7dce1 100644
--- a/epan/dissectors/packet-cip.c
+++ b/epan/dissectors/packet-cip.c
@@ -4357,7 +4357,7 @@ dissect_cip_multiple_service_packet_req(tvbuff_t *tvb, packet_info *pinfo, proto
col_append_str( pinfo->cinfo, COL_INFO, ", ");
- next_tvb = tvb_new_subset(tvb, offset+serv_offset, serv_length, serv_length);
+ next_tvb = tvb_new_subset_length(tvb, offset+serv_offset, serv_length);
if ( mr_mult_req_info )
{
@@ -4676,7 +4676,7 @@ dissect_cip_multiple_service_packet_rsp(tvbuff_t *tvb, packet_info *pinfo, proto
col_append_str( pinfo->cinfo, COL_INFO, ", ");
- next_tvb = tvb_new_subset(tvb, offset+serv_offset, serv_length, serv_length);
+ next_tvb = tvb_new_subset_length(tvb, offset+serv_offset, serv_length);
if ( mr_mult_req_info )
{
mr_single_req_info = mr_mult_req_info->requests + i;
@@ -5127,7 +5127,7 @@ dissect_cip_cm_data( proto_tree *item_tree, tvbuff_t *tvb, int offset, int item_
p_add_proto_data(wmem_file_scope(), pinfo, proto_cip, 0, pembedded_req_info );
proto_tree_add_text( item_tree, NULL, 0, 0, "(Service: Unconnected Send (Response))" );
- next_tvb = tvb_new_subset(tvb, offset, item_length, item_length);
+ next_tvb = tvb_new_subset_length(tvb, offset, item_length);
if ( pembedded_req_info && pembedded_req_info->dissector )
call_dissector(pembedded_req_info->dissector, next_tvb, pinfo, item_tree );
else
@@ -5432,7 +5432,7 @@ dissect_cip_cm_data( proto_tree *item_tree, tvbuff_t *tvb, int offset, int item_
col_append_str( pinfo->cinfo, COL_INFO, ": ");
- next_tvb = tvb_new_subset(tvb, offset+2+req_path_size+4, msg_req_siz, msg_req_siz);
+ next_tvb = tvb_new_subset_length(tvb, offset+2+req_path_size+4, msg_req_siz);
preq_info = (cip_req_info_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_cip, 0 );
pembedded_req_info = NULL;
if ( preq_info )
@@ -5592,7 +5592,7 @@ dissect_cip_mb_data( proto_tree *item_tree, tvbuff_t *tvb, int offset, int item_
if( tvb_length_remaining(tvb, offset) > 0 )
{
/* dissect the Modbus PDU */
- next_tvb = tvb_new_subset( tvb, offset+4+add_stat_size, item_length-4-add_stat_size, item_length-4-add_stat_size);
+ next_tvb = tvb_new_subset_length( tvb, offset+4+add_stat_size, item_length-4-add_stat_size);
/* keep packet context */
request_info = wmem_new(wmem_packet_scope(), modbus_request_info_t);
@@ -5682,7 +5682,7 @@ dissect_cip_mb_data( proto_tree *item_tree, tvbuff_t *tvb, int offset, int item_
if( tvb_length_remaining(tvb, offset) > 0 )
{
/* dissect the Modbus PDU */
- next_tvb = tvb_new_subset( tvb, offset+2+req_path_size, item_length-req_path_size-2, item_length-req_path_size-2);
+ next_tvb = tvb_new_subset_length( tvb, offset+2+req_path_size, item_length-req_path_size-2);
/* keep packet context */
request_info = wmem_new(wmem_packet_scope(), modbus_request_info_t);