From 91c069d5b3dd4736653287a9e454b06354564011 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 28 May 2018 11:22:52 -0700 Subject: [PATCH] Fix test for early exit from MMSE dissector. We don't need to dissect the body if 1) we're *not* building a protocol tree (tree == NULL) *and* 2) the PDU doesn't have content that can be handed off to subdissectors. (Fix which vs. that issue in a comment while we're at it.) Change-Id: I90890975c05e72cc9ebc776a21683905828f57b5 Reviewed-on: https://code.wireshark.org/review/27876 Reviewed-by: Guy Harris --- epan/dissectors/packet-mmse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epan/dissectors/packet-mmse.c b/epan/dissectors/packet-mmse.c index a5c78a0037..ffb4faa003 100644 --- a/epan/dissectors/packet-mmse.c +++ b/epan/dissectors/packet-mmse.c @@ -715,10 +715,10 @@ dissect_mmse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 pdut, /* * Cycle through MMS-headers * - * NOTE - some PDUs may convey content which can be handed off + * NOTE - some PDUs may convey content that can be handed off * to subdissectors. */ - if (tree || pdu_has_content(pdut)) { + if (tree == NULL && !pdu_has_content(pdut)) { DebugLog(("tree == NULL and PDU has no potential content\n")); return; } -- 2.34.1