diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2015-08-01 18:38:15 +0200 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2015-08-02 15:41:45 +0000 |
commit | d12283b8e9ec66e14b468595913f099c39e8fb5f (patch) | |
tree | 20cb259ab1e216f1fbdc590354d5c432ca6ad528 | |
parent | 37a1bb8ca4af21b29298196356beb379040f891c (diff) | |
download | wireshark-d12283b8e9ec66e14b468595913f099c39e8fb5f.tar.gz |
proto.c: exclude hf_text_only from proto_registrar_is_protocol()
This pseudo field is a specific case that is not linked to any protocol (despite parent being set to -1).
This prevents a crash in Qt GUI when selecting a line added with proto_tree_add_subtree() or similar.
Change-Id: I3b1cc2e6c7e71a71898f2ee9a02e9158eccf6fac
Reviewed-on: https://code.wireshark.org/review/9845
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
-rw-r--r-- | epan/proto.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/proto.c b/epan/proto.c index f9c383759b..26fe71f974 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -7207,7 +7207,7 @@ proto_registrar_is_protocol(const int n) header_field_info *hfinfo; PROTO_REGISTRAR_GET_NTH(n, hfinfo); - return (hfinfo->parent == -1 ? TRUE : FALSE); + return (((hfinfo->id != hf_text_only) && (hfinfo->parent == -1)) ? TRUE : FALSE); } /* Returns length of field in packet (not necessarily the length |