diff options
author | Gerald Combs <gerald@wireshark.org> | 2021-02-19 09:46:55 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2021-02-19 10:11:24 -0800 |
commit | b620a5e53514b8b2711784299673475e16556995 (patch) | |
tree | adfddd5be4ca76c97c41b31f29af0c2b890419f8 | |
parent | 72c9b4b1e8e9bb5ae0ffc4493f3fd86b06c014d8 (diff) |
VJC: Fixup some proto_tree_add_expert calls.
Make sure we add expert items to a valid tree. Fixes
** (process:11088): WARNING **: 17:45:42.159: Dissector bug, protocol VJC, in packet 12: "Text item" - "text" tfi->tree_type: -1 invalid (../epan/proto.c:5885)
-rw-r--r-- | epan/dissectors/packet-vj-comp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-vj-comp.c b/epan/dissectors/packet-vj-comp.c index a3cd66be07..7a2cf7d336 100644 --- a/epan/dissectors/packet-vj-comp.c +++ b/epan/dissectors/packet-vj-comp.c @@ -481,10 +481,10 @@ done_header_len: ti = proto_tree_add_bitmask(subtree, tvb, 0, hf_vjc_change_mask, ett_vjc_change_mask, vjc_change_mask_fields, ENC_NA); if ((flags & VJC_FLAGS_SAWU) == VJC_FLAGS_SAWU) { - proto_tree_add_expert(ti, pinfo, &ei_vjc_sawu, tvb, 0, 1); + proto_tree_add_expert(subtree, pinfo, &ei_vjc_sawu, tvb, 0, 1); } else if ((flags & VJC_FLAGS_SAWU) == VJC_FLAGS_SWU) { - proto_tree_add_expert(ti, pinfo, &ei_vjc_swu, tvb, 0, 1); + proto_tree_add_expert(subtree, pinfo, &ei_vjc_swu, tvb, 0, 1); } offset++; @@ -502,7 +502,7 @@ done_header_len: proto_item_set_generated(ti); } else { - proto_tree_add_expert(ti, pinfo, &ei_vjc_no_cnum, tvb, 0, 0); + proto_tree_add_expert(subtree, pinfo, &ei_vjc_no_cnum, tvb, 0, 0); } } conv = vjc_find_conversation(pinfo, vjc_cnum, FALSE); @@ -511,7 +511,7 @@ done_header_len: // Will be testing that pkt_data exists below } else { - proto_tree_add_expert(ti, pinfo, &ei_vjc_no_conversation, + proto_tree_add_expert(subtree, pinfo, &ei_vjc_no_conversation, tvb, 1, (flags & VJC_FLAG_C) ? 1 : 0); } |