diff options
author | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-05-29 06:34:05 +0000 |
---|---|---|
committer | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-05-29 06:34:05 +0000 |
commit | f0265bcf9db66a78c6121c9fb6919ff9067df079 (patch) | |
tree | c18e70642c12c93011be3a7f37eba8c5212d6ebb /epan/dissectors/packet-dvbci.c | |
parent | c6d4c7ed2c3a2e00aa7600bec37264e6c69b59ae (diff) |
From Martin Kaiser:
checks the address of the Configuration
Option Register that is used for switching a PC-Card in DVB-CI mode.
The address must be <= 0xffe..
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5940
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37454 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-dvbci.c')
-rw-r--r-- | epan/dissectors/packet-dvbci.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/epan/dissectors/packet-dvbci.c b/epan/dissectors/packet-dvbci.c index 8b8a53efef..55f7a9f4a6 100644 --- a/epan/dissectors/packet-dvbci.c +++ b/epan/dissectors/packet-dvbci.c @@ -1413,6 +1413,7 @@ dissect_dvbci(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tvbuff_t *payload_tvb; guint16 cor_addr; guint8 cor_value; + proto_item *pi; guint8 hw_event; if (tvb_length(tvb) < 4) @@ -1469,15 +1470,29 @@ dissect_dvbci(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* I did not assign hf_... values for cor_addr and cor_value there's no need to filter against them */ cor_addr = tvb_get_ntohs(tvb, offset); - proto_tree_add_text(dvbci_tree, tvb, offset, 2, + if (cor_addr == 0xffff) { + proto_tree_add_text(dvbci_tree, tvb, offset, 2, + "COR address is unknown"); + col_append_sep_str(pinfo->cinfo, COL_INFO, ": ", "unknown address"); + } + else if (cor_addr > 0xFFE) { + pi = proto_tree_add_text(tree, tvb, offset, 2, "Invalid COR address"); + expert_add_info_format(pinfo, pi, PI_PROTOCOL, PI_WARN, + "COR address must not be greater than 0xFFE (DVB-CI spec, A.5.6)"); + } + else { + proto_tree_add_text(dvbci_tree, tvb, offset, 2, "COR address: 0x%x", cor_addr); + col_append_sep_fstr(pinfo->cinfo, COL_INFO, ": ", + "address 0x%x", cor_addr); + } offset += 2; cor_value = tvb_get_guint8(tvb, offset); proto_tree_add_text(dvbci_tree, tvb, offset, 1, "COR value: 0x%x", cor_value); + col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, + "value 0x%x", cor_value); offset++; - col_append_sep_fstr(pinfo->cinfo, COL_INFO, ": ", - "address 0x%x, value 0x%x", cor_addr, cor_value); } else if (event==HW_EVT) { hw_event = tvb_get_guint8(tvb, offset); |