aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ieee80211.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-ieee80211.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-ieee80211.c')
-rw-r--r--epan/dissectors/packet-ieee80211.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c
index 807f84e868..c9eeaf880b 100644
--- a/epan/dissectors/packet-ieee80211.c
+++ b/epan/dissectors/packet-ieee80211.c
@@ -17968,7 +17968,7 @@ dissect_ieee80211_common(tvbuff_t *tvb, packet_info *pinfo,
item=proto_tree_add_uint(hdr_tree, hf_ieee80211_fc_analysis_retransmission_frame, tvb, 0, 0, fnum);
PROTO_ITEM_SET_GENERATED(item);
}
- next_tvb = tvb_new_subset(tvb, hdr_len, len, reported_len);
+ next_tvb = tvb_new_subset_length_caplen(tvb, hdr_len, len, reported_len);
call_data_dissector(next_tvb, pinfo, tree);
goto end_of_wlan;
}
@@ -18195,7 +18195,7 @@ dissect_ieee80211_common(tvbuff_t *tvb, packet_info *pinfo,
* WEP decode impossible or failed, treat payload as raw data
* and don't attempt fragment reassembly or further dissection.
*/
- next_tvb = tvb_new_subset(tvb, hdr_len + ivlen, len, reported_len);
+ next_tvb = tvb_new_subset_length_caplen(tvb, hdr_len + ivlen, len, reported_len);
if (tree) {
if (algorithm == PROTECTION_ALG_WEP) {
@@ -18312,7 +18312,7 @@ dissect_ieee80211_common(tvbuff_t *tvb, packet_info *pinfo,
/* First fragment, or not fragmented. Dissect what we have here. */
/* Get a tvbuff for the payload. */
- next_tvb = tvb_new_subset(next_tvb, hdr_len, len, reported_len);
+ next_tvb = tvb_new_subset_length_caplen(next_tvb, hdr_len, len, reported_len);
/*
* If this is the first fragment, but not the only fragment,
@@ -18328,7 +18328,7 @@ dissect_ieee80211_common(tvbuff_t *tvb, packet_info *pinfo,
if (next_tvb == NULL) {
/* Just show this as an incomplete fragment. */
col_set_str(pinfo->cinfo, COL_INFO, "Fragmented IEEE 802.11 frame");
- next_tvb = tvb_new_subset(tvb, hdr_len, len, reported_len);
+ next_tvb = tvb_new_subset_length_caplen(tvb, hdr_len, len, reported_len);
call_data_dissector(next_tvb, pinfo, tree);
pinfo->fragmented = save_fragmented;
goto end_of_wlan;