From 64fa3d40368c3c592116ed64485e9f678e8eebef Mon Sep 17 00:00:00 2001 From: Jeff Morriss Date: Thu, 23 Aug 2012 19:07:24 +0000 Subject: [PATCH] Don't call dissect_custom_message() when it's not initialized. svn path=/trunk/; revision=44646 --- epan/dissectors/packet-llrp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/epan/dissectors/packet-llrp.c b/epan/dissectors/packet-llrp.c index 14a33630fb..a8b446214e 100644 --- a/epan/dissectors/packet-llrp.c +++ b/epan/dissectors/packet-llrp.c @@ -1693,7 +1693,7 @@ dissect_llrp_parameters(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, { type = tvb_get_ntohs(tvb, offset); len = tvb_get_ntohs(tvb, offset + 2); - + param_end = offset + len; if (len < LLRP_TLV_LEN_MIN) @@ -2383,7 +2383,7 @@ dissect_llrp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 spec_id, vendor; proto_item *request_item, *antenna_item, *gpi_item, *gpo_item; guint (*dissect_custom_message)(tvbuff_t *tvb, - packet_info *pinfo, proto_tree *tree, guint offset); + packet_info *pinfo, proto_tree *tree, guint offset) = NULL; ends_with_parameters = FALSE; switch (type) @@ -2562,7 +2562,8 @@ dissect_llrp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ends_with_parameters = TRUE; break; } - offset = dissect_custom_message(tvb, pinfo, tree, offset); + if (dissect_custom_message) + offset = dissect_custom_message(tvb, pinfo, tree, offset); break; /* Some have no extra data expected */ case LLRP_TYPE_KEEPALIVE: