diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2016-01-04 15:29:16 +0100 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2016-01-04 19:17:50 +0000 |
commit | 849d87af1cb9f3e19222e452fd76483244375a03 (patch) | |
tree | 7880cf2e46eca2f9817dd44146b71d321decc865 /ui/decode_as_utils.c | |
parent | 28287ec8a72de4d83a6528ba6895cb7985457111 (diff) | |
download | wireshark-849d87af1cb9f3e19222e452fd76483244375a03.tar.gz wireshark-849d87af1cb9f3e19222e452fd76483244375a03.tar.bz2 wireshark-849d87af1cb9f3e19222e452fd76483244375a03.zip |
PPP: fix registration of CRTP (CNTCP) protocol
Also protect against any badly registered protocol
Bug: 11958
Change-Id: I0c03f50c2c5478a9524ad06e669510ffb5739b21
Reviewed-on: https://code.wireshark.org/review/13041
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'ui/decode_as_utils.c')
-rw-r--r-- | ui/decode_as_utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/decode_as_utils.c b/ui/decode_as_utils.c index 22ff62ab26..6a6f25fe4a 100644 --- a/ui/decode_as_utils.c +++ b/ui/decode_as_utils.c @@ -80,7 +80,8 @@ change_dissector_if_matched(gpointer item, gpointer user_data) { dissector_handle_t handle = (dissector_handle_t)item; lookup_entry_t * lookup = (lookup_entry_t *)user_data; - if (strcmp(lookup->dissector_short_name, dissector_handle_get_short_name(handle)) == 0) { + const gchar *proto_short_name = dissector_handle_get_short_name(handle); + if (proto_short_name && strcmp(lookup->dissector_short_name, proto_short_name) == 0) { lookup->handle = handle; } } |