aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/packet-lmp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/epan/dissectors/packet-lmp.c b/epan/dissectors/packet-lmp.c
index 8774cc17cd..b6abbcfb7c 100644
--- a/epan/dissectors/packet-lmp.c
+++ b/epan/dissectors/packet-lmp.c
@@ -761,6 +761,7 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
guint8 lmp_class;
guint8 type;
guint8 negotiable;
+ int filter_num;
const char *object_type;
obj_length = tvb_get_ntohs(tvb, offset+2);
@@ -771,10 +772,10 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
hidden_item = proto_tree_add_uint(lmp_tree, hf_lmp_filter[LMPF_OBJECT], tvb,
offset, 1, lmp_class);
PROTO_ITEM_SET_GENERATED(hidden_item);
- if (lmp_valid_class(lmp_class)) {
-
+ filter_num = lmp_class_to_filter_num(lmp_class);
+ if (filter_num != -1 && lmp_valid_class(lmp_class)) {
ti = proto_tree_add_item(lmp_tree,
- hf_lmp_filter[lmp_class_to_filter_num(lmp_class)],
+ hf_lmp_filter[filter_num],
tvb, offset, obj_length, ENC_NA); /* all possibilities are FT_NONE */
} else {
expert_add_info_format(pinfo, hidden_item, &ei_lmp_invalid_class,