aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mpeg-descriptor.c
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2014-05-31 15:30:14 +0200
committerMartin Kaiser <wireshark@kaiser.cx>2014-05-31 13:32:06 +0000
commit3ec1ec1caf3029f47dc362077af421662c86ae85 (patch)
treee8c698a449efdd24372a6e251a0a41838ebac723 /epan/dissectors/packet-mpeg-descriptor.c
parent62fd14cbd713765e24212595f8778164dd5b7b44 (diff)
do a plausibility check for interaction channel data
in the linkage descriptor Change-Id: I7ebca539076b2b881e82fd6baec5bb223e778a52 Reviewed-on: https://code.wireshark.org/review/1896 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
Diffstat (limited to 'epan/dissectors/packet-mpeg-descriptor.c')
-rw-r--r--epan/dissectors/packet-mpeg-descriptor.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/epan/dissectors/packet-mpeg-descriptor.c b/epan/dissectors/packet-mpeg-descriptor.c
index 4ef9f330e2..a517d1f20b 100644
--- a/epan/dissectors/packet-mpeg-descriptor.c
+++ b/epan/dissectors/packet-mpeg-descriptor.c
@@ -1169,6 +1169,13 @@ proto_mpeg_descriptor_dissect_linkage(tvbuff_t *tvb, guint offset, guint len, pr
proto_tree_add_item(tree, hf_mpeg_descr_linkage_event_simulcast, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_mpeg_descr_linkage_reserved2, tvb, offset, 1, ENC_BIG_ENDIAN);
} else if (linkage_type == 0x81) {
+ /* linkage type 0x81 is "user defined" in the DVB-SI spec (EN 300468)
+ it is defined in the interaction channel spec (EN 301790)
+ it seems that in practice, 0x81 is also used for other purposes than interaction channel
+ if the following data really belongs to interaction channel, we need at least another 7 bytes */
+ if (offset+7>end)
+ return;
+
proto_tree_add_item(tree, hf_mpeg_descr_linkage_interactive_network_id, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
@@ -1177,7 +1184,6 @@ proto_mpeg_descriptor_dissect_linkage(tvbuff_t *tvb, guint offset, guint len, pr
offset += 1;
while (population_id_loop_count--) {
-
population_id_base = tvb_get_ntohs(tvb, offset);
population_id_mask = tvb_get_ntohs(tvb, offset + 2);
pi = proto_tree_add_uint_format_value(tree, hf_mpeg_descr_linkage_population_id, tvb, offset, 4,