diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2013-01-08 21:44:12 +0000 |
---|---|---|
committer | Martin Kaiser <wireshark@kaiser.cx> | 2013-01-08 21:44:12 +0000 |
commit | 898dfde38366c74a7ae8111ea3ecd02ab3a0499c (patch) | |
tree | a4179ab59ef7bcfdd969748b6e42ab6fecce873c /epan/dissectors/packet-dvbci.c | |
parent | 433d9c198d2cd81a35ddcc32529d167dd4edddd5 (diff) |
bring up a warning if an APDU's length field does not match the number
of payload bytes
svn path=/trunk/; revision=46997
Diffstat (limited to 'epan/dissectors/packet-dvbci.c')
-rw-r--r-- | epan/dissectors/packet-dvbci.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/epan/dissectors/packet-dvbci.c b/epan/dissectors/packet-dvbci.c index 7c8471cb58..da410065ab 100644 --- a/epan/dissectors/packet-dvbci.c +++ b/epan/dissectors/packet-dvbci.c @@ -3772,13 +3772,16 @@ dissect_dvbci_apdu(tvbuff_t *tvb, circuit_t *circuit, } offset = dissect_ber_length(pinfo, app_tree, tvb, offset, &len_field, NULL); - if ((offset+len_field) > apdu_len) { + if ((offset+len_field) != apdu_len) { pi = proto_tree_add_text(app_tree, tvb, APDU_TAG_SIZE, offset-APDU_TAG_SIZE, "Length field mismatch"); - expert_add_info_format(pinfo, pi, PI_MALFORMED, PI_ERROR, - "Length field mismatch"); - return; + expert_add_info_format(pinfo, pi, PI_PROTOCOL, PI_WARN, + "Length field is different from the number of apdu payload bytes"); + /* we need len_field bytes of apdu payload to call + ai->dissect_payload() and continue dissecting */ + if (apdu_len < offset+len_field) + return; } ai = (apdu_info_t *)g_hash_table_lookup(apdu_table, |