aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/packet-ieee80211.c3
-rw-r--r--epan/dissectors/packet-pana.c2
-rw-r--r--epan/dissectors/packet-rpc.c8
-rw-r--r--epan/dissectors/packet-smb.c3
-rw-r--r--epan/dissectors/packet-tcp.c9
-rw-r--r--epan/dissectors/packet-zbee-security.c3
6 files changed, 9 insertions, 19 deletions
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c
index c6ec062690..31c4d76fd0 100644
--- a/epan/dissectors/packet-ieee80211.c
+++ b/epan/dissectors/packet-ieee80211.c
@@ -12157,9 +12157,8 @@ static tvbuff_t *try_decrypt_wep(tvbuff_t *tvb, guint32 offset, guint32 len) {
if (wep_decrypt(tmp, len, i) == 0) {
/* decrypt successful, let's set up a new data tvb. */
- decr_tvb = tvb_new_real_data(tmp, len-8, len-8);
+ decr_tvb = tvb_new_child_real_data(tvb, tmp, len-8, len-8);
tvb_set_free_cb(decr_tvb, g_free);
- tvb_set_child_real_data_tvbuff(tvb, decr_tvb);
break;
}
diff --git a/epan/dissectors/packet-pana.c b/epan/dissectors/packet-pana.c
index e7a9abacb7..387ab67263 100644
--- a/epan/dissectors/packet-pana.c
+++ b/epan/dissectors/packet-pana.c
@@ -483,7 +483,7 @@ dissect_avps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *avp_tree)
"AVP Value (EAP packet)");
avp_eap_tree = proto_item_add_subtree(avp_eap_item, ett_pana_avp);
eap_tvb = tvb_new_subset(tvb, offset, avp_data_length, avp_data_length);
- if (avp_eap_tree != NULL && eap_handle != NULL) {
+ if (eap_handle != NULL) {
call_dissector(eap_handle, eap_tvb, pinfo, avp_eap_tree);
}
break;
diff --git a/epan/dissectors/packet-rpc.c b/epan/dissectors/packet-rpc.c
index 4722790ede..68ecfbae12 100644
--- a/epan/dissectors/packet-rpc.c
+++ b/epan/dissectors/packet-rpc.c
@@ -3223,16 +3223,10 @@ dissect_rpc_fragment(tvbuff_t *tvb, int offset, packet_info *pinfo,
* Create a new TVB structure for
* defragmented data.
*/
- rec_tvb = tvb_new_real_data(ipfd_head->data,
+ rec_tvb = tvb_new_child_real_data(tvb, ipfd_head->data,
ipfd_head->datalen, ipfd_head->datalen);
/*
- * Add this tvb as a child to the original
- * one.
- */
- tvb_set_child_real_data_tvbuff(tvb, rec_tvb);
-
- /*
* Add defragmented data to the data source list.
*/
add_new_data_source(pinfo, rec_tvb, "Defragmented");
diff --git a/epan/dissectors/packet-smb.c b/epan/dissectors/packet-smb.c
index 56faa33ee5..46aa05a012 100644
--- a/epan/dissectors/packet-smb.c
+++ b/epan/dissectors/packet-smb.c
@@ -15140,9 +15140,8 @@ dissect_transaction_response(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
if(r_fd){
proto_item *frag_tree_item;
- pd_tvb = tvb_new_real_data(r_fd->data, r_fd->datalen,
+ pd_tvb = tvb_new_child_real_data(tvb, r_fd->data, r_fd->datalen,
r_fd->datalen);
- tvb_set_child_real_data_tvbuff(tvb, pd_tvb);
add_new_data_source(pinfo, pd_tvb, "Reassembled SMB");
show_fragment_tree(r_fd, &smb_frag_items, tree, pinfo, pd_tvb, &frag_tree_item);
}
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c
index a34ed243e9..de541ac96b 100644
--- a/epan/dissectors/packet-tcp.c
+++ b/epan/dissectors/packet-tcp.c
@@ -3577,11 +3577,10 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if(ipfd_head){
tvbuff_t *next_tvb;
- /* create a new TVB structure for desegmented data */
- next_tvb = tvb_new_real_data(ipfd_head->data, ipfd_head->datalen, ipfd_head->datalen);
-
- /* add this tvb as a child to the original one */
- tvb_set_child_real_data_tvbuff(tvb, next_tvb);
+ /* create a new TVB structure for desegmented data
+ * datalen-1 to strip the dummy FIN byte off
+ */
+ next_tvb = tvb_new_child_real_data(tvb, ipfd_head->data, ipfd_head->datalen, ipfd_head->datalen);
/* add desegmented data to the data source list */
add_new_data_source(pinfo, next_tvb, "Reassembled TCP");
diff --git a/epan/dissectors/packet-zbee-security.c b/epan/dissectors/packet-zbee-security.c
index 942fb31f41..55e5240c61 100644
--- a/epan/dissectors/packet-zbee-security.c
+++ b/epan/dissectors/packet-zbee-security.c
@@ -579,8 +579,7 @@ dissect_zbee_secure(tvbuff_t *tvb, packet_info *pinfo, proto_tree* tree, guint o
}
/* Setup the new tvbuff_t and return */
- payload_tvb = tvb_new_real_data(dec_buffer, payload_len, payload_len);
- tvb_set_child_real_data_tvbuff(tvb, payload_tvb);
+ payload_tvb = tvb_new_child_real_data(tvb, dec_buffer, payload_len, payload_len);
add_new_data_source(pinfo, payload_tvb, "Decrypted ZigBee Payload");
/* Done! */
return payload_tvb;