diff options
author | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-09-02 19:54:16 +0000 |
---|---|---|
committer | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-09-02 19:54:16 +0000 |
commit | 1ee1c45ed41d116669c89757985bf3f9dabd7c7f (patch) | |
tree | cd4d1e52e8877f9b6c9b3384eaac0b64178f0694 | |
parent | a29b6af81938d077220b29b1b9af25b82e9458f2 (diff) |
In RTnet, make sure we don't pass a null handle to call_dissector(). Add
an entry about this to the release notes. Fixes a recent buildbot crash.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15673 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r-- | docbook/release-notes.xml | 7 | ||||
-rw-r--r-- | plugins/rtnet/packet-rtnet.c | 10 |
2 files changed, 11 insertions, 6 deletions
diff --git a/docbook/release-notes.xml b/docbook/release-notes.xml index b557261772..4761e826ad 100644 --- a/docbook/release-notes.xml +++ b/docbook/release-notes.xml @@ -142,6 +142,13 @@ Gnu info Versions affected: 0.9.14 to 0.10.12. </para></listitem> + <listitem><para> + The RTnet dissector could dereference a null pointer and crash. + <!-- Fixed in r15673 --> + <!-- Bug IDs: none --> + Versions affected: 0.10.8 to 0.10.12. + </para></listitem> + </itemizedlist> </para> </section> diff --git a/plugins/rtnet/packet-rtnet.c b/plugins/rtnet/packet-rtnet.c index d9b8033623..c5929453d1 100644 --- a/plugins/rtnet/packet-rtnet.c +++ b/plugins/rtnet/packet-rtnet.c @@ -134,8 +134,8 @@ static const value_string tdma_msg_vals[] = { { 0, NULL } }; -static dissector_table_t ethertype_table; -static dissector_handle_t data_handle; +static dissector_table_t ethertype_table = NULL; +static dissector_handle_t data_handle = NULL; void proto_reg_handoff_rtmac(void); void proto_reg_handoff_rtcfg(void); @@ -590,16 +590,14 @@ dissect_rtmac(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { type_str = match_strval(type, rtmac_type_vals); if (!type_str) { dissector = dissector_get_port_handle(ethertype_table, type); - if (!dissector) - dissector = data_handle; } } else { if (flags & RTMAC_FLAG_TUNNEL) { dissector = dissector_get_port_handle(ethertype_table, type); - if (!dissector) - dissector = data_handle; } } + if (!dissector) + dissector = data_handle; if (tree) { ti = proto_tree_add_item(tree, proto_rtmac, tvb, offset, 4, FALSE); |