diff options
author | Peter Wu <lekensteyn@gmail.com> | 2014-02-10 12:51:43 +0100 |
---|---|---|
committer | Peter Wu <lekensteyn@gmail.com> | 2014-02-10 12:51:43 +0100 |
commit | 54240ab2dfa9ec95aedad10135fe80d6a6118e69 (patch) | |
tree | 0e686f47143c0c15a3b2bc352927e94a8b9b6796 | |
parent | c234f2db5c2f9a6e046829107d538b2495a39d62 (diff) | |
download | wireshark-proto-coc.tar.gz |
coc: Do not add a zero-length itemproto-coc
-rw-r--r-- | epan/dissectors/packet-coc.c | 3 |
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); } |