diff options
author | Peter Wu <peter@lekensteyn.nl> | 2016-01-12 00:08:00 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-01-25 23:16:02 +0000 |
commit | 0ff957aedec43e0ba3c0e7f54b9de14d54da86ec (patch) | |
tree | e713734076be28381faa07536e4424bc09475029 /epan/dissectors/packet-ssl-utils.c | |
parent | 0f5bed39fe90659615b192d9a88d7d206d349fff (diff) |
dns,spdy,ssl-utils: fix export PDU
Dissectors registered with SSL must be registered for Export PDU to
work properly. Otherwise the dissector name could be NULL, resulting
in a capture file that cannot properly be dissected.
Add an assertion to ssl-utils to catch this situation. Note that this
results in an "wmem_alloc: assertion failed: (allocator->in_scope)"
report because these functions are possibly called in the protocol
handoff routines... Can be fixed later.
The DNS dissector is fixed by merging the UDP/TCP dissectors into a
single dns handle which recognizes TCP and then assumes the length
prefix if TCP.
Change-Id: If73b9b09a4682d66fb8fa026c42a3475648f9bf1
Reviewed-on: https://code.wireshark.org/review/13194
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-ssl-utils.c')
-rw-r--r-- | epan/dissectors/packet-ssl-utils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/epan/dissectors/packet-ssl-utils.c b/epan/dissectors/packet-ssl-utils.c index 3c40f53f72..c6570bb754 100644 --- a/epan/dissectors/packet-ssl-utils.c +++ b/epan/dissectors/packet-ssl-utils.c @@ -4152,6 +4152,9 @@ ssl_association_add(const char* dissector_table_name, dissector_handle_t main_ha { DISSECTOR_ASSERT(main_handle); DISSECTOR_ASSERT(subdissector_handle); + /* Registration is required for Export PDU feature to work properly. */ + DISSECTOR_ASSERT_HINT(dissector_handle_get_dissector_name(subdissector_handle), + "SSL appdata dissectors must register with register_dissector()!"); ssl_debug_printf("association_add %s port %d handle %p\n", dissector_table_name, port, (void *)subdissector_handle); if (port) { |