aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gsm_a_dtap.c
diff options
context:
space:
mode:
authorAnders <anders.broman@ericsson.com>2016-10-26 16:30:57 +0200
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2016-10-26 19:30:53 +0000
commitecfee35ec80c39eb384e534ea3f720de96f505f8 (patch)
tree8bce6896b96483f60a8eaf55cef10ce4b80f2754 /epan/dissectors/packet-gsm_a_dtap.c
parent5afe1a70df102e3610388a66489014302077ebd5 (diff)
[DTAP] Add an expert info when DTAP_TIE_PRES_MASK is there and the length
is less than 3. Bug 13052 Change-Id: I62aabf93059ec763eff629125084a45aba84cb3a Reviewed-on: https://code.wireshark.org/review/18474 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-gsm_a_dtap.c')
-rw-r--r--epan/dissectors/packet-gsm_a_dtap.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/epan/dissectors/packet-gsm_a_dtap.c b/epan/dissectors/packet-gsm_a_dtap.c
index 587affd4d2..82843eb4de 100644
--- a/epan/dissectors/packet-gsm_a_dtap.c
+++ b/epan/dissectors/packet-gsm_a_dtap.c
@@ -752,6 +752,7 @@ static expert_field ei_gsm_a_dtap_end_mark_unexpected = EI_INIT;
static expert_field ei_gsm_a_dtap_extraneous_data = EI_INIT;
static expert_field ei_gsm_a_dtap_missing_mandatory_element = EI_INIT;
static expert_field ei_gsm_a_dtap_coding_scheme = EI_INIT;
+static expert_field ei_gsm_a_dtap_ti_not_valid = EI_INIT;
static dissector_table_t u2u_dissector_table;
@@ -6746,6 +6747,10 @@ dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
if ((((oct_1 & DTAP_TI_MASK) >> 4) & DTAP_TIE_PRES_MASK) == DTAP_TIE_PRES_MASK)
{
+ if (len == 2) {
+ proto_tree_add_expert(tree, pinfo, &ei_gsm_a_dtap_ti_not_valid, tvb, offset, 1);
+ return len;
+ }
/*
* eventhough we don't know if a TI should be in the message yet
* we rely on the TI/SKIP indicator to be 0 to avoid taking this
@@ -8228,7 +8233,8 @@ proto_register_gsm_a_dtap(void)
{ &ei_gsm_a_dtap_keypad_info_not_dtmf_digit, { "gsm_a.dtap.keypad_info_not_dtmf_digit", PI_MALFORMED, PI_WARN, "Keypad information contains character that is not a DTMF digit", EXPFILL }},
{ &ei_gsm_a_dtap_extraneous_data, { "gsm_a.dtap.extraneous_data", PI_PROTOCOL, PI_NOTE, "Extraneous Data, dissector bug or later version spec(report to wireshark.org)", EXPFILL }},
{ &ei_gsm_a_dtap_missing_mandatory_element, { "gsm_a.dtap.missing_mandatory_element", PI_PROTOCOL, PI_WARN, "Missing Mandatory element, rest of dissection is suspect", EXPFILL }},
- { &ei_gsm_a_dtap_coding_scheme, { "gsm_a.dtap.coding_scheme.unknown", PI_PROTOCOL, PI_WARN, "Text string encoded according to an unknown Coding Scheme", EXPFILL }},
+ { &ei_gsm_a_dtap_coding_scheme, { "gsm_a.dtap.coding_scheme.unknown", PI_PROTOCOL, PI_WARN, "Text string encoded according to an unknown Coding Scheme", EXPFILL } },
+ { &ei_gsm_a_dtap_ti_not_valid,{ "gsm_a.dtap.ti_not_valid", PI_PROTOCOL, PI_ERROR, "If TI bits = 7, lenght must be > 2", EXPFILL } },
};
expert_module_t* expert_a_dtap;