aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2017-06-04 16:42:48 +0200
committerPascal Quantin <pascal.quantin@gmail.com>2017-06-04 15:51:01 +0000
commit6d29f50d61de03f73a2a9336378b1c846ae65924 (patch)
tree0dd3422ff3c79868c08679e384b47d134754ab19
parent88cf898c4409d4267ef11eb6676cca5c8b05c435 (diff)
GSM A DTAP: fix detection of missing first mandatory element
Bug: 13760 Change-Id: I1c062420f96104a46e5d1478eb054f086f942b54 Reviewed-on: https://code.wireshark.org/review/21946 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
-rw-r--r--epan/dissectors/packet-gsm_a_dtap.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/epan/dissectors/packet-gsm_a_dtap.c b/epan/dissectors/packet-gsm_a_dtap.c
index 4006bbe915..f65e3a883d 100644
--- a/epan/dissectors/packet-gsm_a_dtap.c
+++ b/epan/dissectors/packet-gsm_a_dtap.c
@@ -6974,14 +6974,15 @@ dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
if (msg_str == NULL) return len;
- if (offset >= len) return len;
-
/*
* decode elements
*/
if (dtap_msg_fcn == NULL)
{
- proto_tree_add_item(dtap_tree, hf_gsm_a_dtap_message_elements, tvb, offset, len - offset, ENC_NA);
+ if (offset < len)
+ {
+ proto_tree_add_item(dtap_tree, hf_gsm_a_dtap_message_elements, tvb, offset, len - offset, ENC_NA);
+ }
}
else
{