diff options
author | Huang Qiangxiong <qiangxiong.huang@qq.com> | 2017-07-24 15:47:53 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-07-25 00:07:55 +0000 |
commit | 1e584b8a13cd6514f2ec5d117d055f3270c944d5 (patch) | |
tree | 4f919263c2afa70250cfe17d3ab5ebd8a601f2fe /epan/dissectors/packet-http2.c | |
parent | be502d221a416ad271e4d13231cd796f8da32ca4 (diff) |
HTTP2: Fix an access invalid memory address error.
The tree may be NULL, so tree->parent may cause access invalid memory address error
which will report 'Dissector bug ... STATUS_ACCESS_VIOLATION' in info column.
Change-Id: I37d4aca2287e77a046e553221a6a824de60aae9c
Reviewed-on: https://code.wireshark.org/review/22776
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-http2.c')
-rw-r--r-- | epan/dissectors/packet-http2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-http2.c b/epan/dissectors/packet-http2.c index 8b5787a691..44f1343c6c 100644 --- a/epan/dissectors/packet-http2.c +++ b/epan/dissectors/packet-http2.c @@ -1348,7 +1348,7 @@ dissect_body_data(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, if (content_type != NULL) { /* add it to STREAM level */ - proto_tree *ptree = tree->parent != NULL ? tree->parent : tree; + proto_tree *ptree = proto_tree_get_parent_tree(tree); dissector_try_string(media_type_dissector_table, content_type, tvb_new_subset_length(tvb, start, length), pinfo, ptree, NULL); } |