summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-coc.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-coc.c')
-rw-r--r--epan/dissectors/packet-coc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/dissectors/packet-coc.c b/epan/dissectors/packet-coc.c
index e447861ecd..6812878f17 100644
--- a/epan/dissectors/packet-coc.c
+++ b/epan/dissectors/packet-coc.c
@@ -142,7 +142,8 @@ dissect_coc_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
offset += 3;
proto_tree_add_item(coc_tree, hf_coc_other, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
- proto_tree_add_item(coc_tree, hf_coc_data, tvb, offset, data_len, ENC_NA);
+ if (data_len)
+ proto_tree_add_item(coc_tree, hf_coc_data, tvb, offset, data_len, ENC_NA);
return tvb_length(tvb);
}