aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-pw-atm.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-01-09 22:18:49 -0800
committerGuy Harris <guy@alum.mit.edu>2017-01-10 06:19:37 +0000
commit7cd6906056922e4b8f68f1216d94eaa0809896fe (patch)
tree5a8c793f188ddda7f36a50369d00ff0de8f563e5 /epan/dissectors/packet-pw-atm.c
parent2a3b2360e15d49defde55240a5c1e171c7cade89 (diff)
Rename tvb_new_subset() to tvb_new_subset_length_caplen().
This emphasizes that there is no such thing as *the* routine to construct a subset tvbuff; you need to choose one of tvb_new_subset_remaining() (if you want a new tvbuff that contains everything past a certain point in an existing tvbuff), tvb_new_subset_length() (if you want a subset that contains everything past a certain point, for some number of bytes, in an existing tvbuff), and tvb_new_subset_length_caplen() (for all other cases). Many of the calls to tvb_new_subset_length_caplen() should really be calling one of the other routines; that's the next step. (This also makes it easier to find the calls that need fixing.) Change-Id: Ieb3d676d8cda535451c119487d7cd3b559221f2b Reviewed-on: https://code.wireshark.org/review/19597 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-pw-atm.c')
-rw-r--r--epan/dissectors/packet-pw-atm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-pw-atm.c b/epan/dissectors/packet-pw-atm.c
index 609c1e7112..6a25be182d 100644
--- a/epan/dissectors/packet-pw-atm.c
+++ b/epan/dissectors/packet-pw-atm.c
@@ -428,7 +428,7 @@ dissect_payload_and_padding(
bytes_to_dissect = SIZEOF_ATM_CELL_PAYLOAD;
else
bytes_to_dissect = (payload_size - dissected);
- tvb_3 = tvb_new_subset(tvb_2, 0, bytes_to_dissect, -1);
+ tvb_3 = tvb_new_subset_length_caplen(tvb_2, 0, bytes_to_dissect, -1);
/*aal5_sdu: disable filling columns after 1st (valid) oam cell*/
if (pd->mode == PWATM_MODE_AAL5_SDU && (pd->pw_cell_number > 0))
{
@@ -872,7 +872,7 @@ dissect_aal5_sdu(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* d
if (padding_size != 0)
{
tvbuff_t* tvb_3;
- tvb_3 = tvb_new_subset(tvb_2, payload_size, padding_size, -1);
+ tvb_3 = tvb_new_subset_length_caplen(tvb_2, payload_size, padding_size, -1);
call_dissector(dh_padding, tvb_3, pinfo, tree);
}
}
@@ -1613,7 +1613,7 @@ dissect_cell(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void * data
proto_tree* tree2;
tvbuff_t* tvb_d;
tree2 = proto_item_add_subtree(item, ett_cell);
- tvb_d = tvb_new_subset(tvb, 0, dissect_size, -1);
+ tvb_d = tvb_new_subset_length_caplen(tvb, 0, dissect_size, -1);
call_data_dissector(tvb_d, pinfo, tree2);
item = proto_tree_add_int(tree2, hf_cell_payload_len, tvb, 0, 0, dissect_size);
PROTO_ITEM_SET_HIDDEN(item);