aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2018-11-16 09:49:45 +0100
committerAnders Broman <a.broman58@gmail.com>2018-11-16 09:55:31 +0000
commit9fe5d3729fad7532776d76c69f24b786a13cfa63 (patch)
treeb2d94729cc43e1233b270c55bcd87a5bea66cfea /epan
parentca96dfe0592d7d21e484634873d2f77529a25ae3 (diff)
gtpv2: Handle different sizes of 8.38 MM Context.
Change-Id: Iaeb795f439a1157bca6d006d2a0bf8fe44703267 Reviewed-on: https://code.wireshark.org/review/30662 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-gtpv2.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/epan/dissectors/packet-gtpv2.c b/epan/dissectors/packet-gtpv2.c
index 4f536199e0..184df5ff2c 100644
--- a/epan/dissectors/packet-gtpv2.c
+++ b/epan/dissectors/packet-gtpv2.c
@@ -4375,6 +4375,10 @@ dissect_gtpv2_mm_context_eps_qq(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
offset +=paging_len;
}
+ if (offset == (gint)length) {
+ return;
+ }
+
/*(u+1) Length of Extended Access Restriction Data */
proto_tree_add_item_ret_uint(tree, hf_gtpv2_mm_context_ex_access_res_data_len, tvb, offset, 1, ENC_BIG_ENDIAN, &ex_access_res_data_len);
offset += 1;
@@ -4391,6 +4395,10 @@ dissect_gtpv2_mm_context_eps_qq(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
offset += 1;
}
+ if (offset == (gint)length) {
+ return;
+ }
+
/*(v+1) Length of UE additional security capability*/
proto_tree_add_item_ret_uint(tree, hf_gtpv2_mm_context_ue_add_sec_cap_len, tvb, offset, 1, ENC_BIG_ENDIAN, &ue_add_sec_cap_len);
offset += 1;