aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mpeg-ca.c
diff options
context:
space:
mode:
authormartink <martink@f5534014-38df-0310-8fa8-9805f1628bb7>2012-08-19 12:53:13 +0000
committermartink <martink@f5534014-38df-0310-8fa8-9805f1628bb7>2012-08-19 12:53:13 +0000
commitae6ed1464dd7e77d8707bdf908d7431106641f54 (patch)
treec03bf1d195fca065bd953b5d3c0e57c146f6412d /epan/dissectors/packet-mpeg-ca.c
parent638a9e4e4425f73a98069d89154790bcbbba84c0 (diff)
highlight only the bytes that actually belong to the CAT
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@44579 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-mpeg-ca.c')
-rw-r--r--epan/dissectors/packet-mpeg-ca.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/epan/dissectors/packet-mpeg-ca.c b/epan/dissectors/packet-mpeg-ca.c
index d2e2a8e20a..1557f3a3cd 100644
--- a/epan/dissectors/packet-mpeg-ca.c
+++ b/epan/dissectors/packet-mpeg-ca.c
@@ -63,18 +63,17 @@ dissect_mpeg_ca(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint offset = 0, length = 0;
- proto_item *ti;
- proto_tree *mpeg_ca_tree;
+ proto_item *ti = NULL;
+ proto_tree *mpeg_ca_tree = NULL;
/* The TVB should start right after the section_length in the Section packet */
col_set_str(pinfo->cinfo, COL_INFO, "Conditional Access Table (CA)");
- if (!tree)
- return;
-
- ti = proto_tree_add_item(tree, proto_mpeg_ca, tvb, offset, -1, ENC_NA);
- mpeg_ca_tree = proto_item_add_subtree(ti, ett_mpeg_ca);
+ if (tree) {
+ ti = proto_tree_add_item(tree, proto_mpeg_ca, tvb, offset, -1, ENC_NA);
+ mpeg_ca_tree = proto_item_add_subtree(ti, ett_mpeg_ca);
+ }
offset += packet_mpeg_sect_header(tvb, offset, mpeg_ca_tree, &length, NULL);
length -= 4;
@@ -94,8 +93,9 @@ dissect_mpeg_ca(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
while (offset < length)
offset += proto_mpeg_descriptor_dissect(tvb, offset, mpeg_ca_tree);
- packet_mpeg_sect_crc(tvb, pinfo, mpeg_ca_tree, 0, offset);
+ offset += packet_mpeg_sect_crc(tvb, pinfo, mpeg_ca_tree, 0, offset);
+ proto_item_set_len(ti, offset);
}