aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gtp.c
diff options
context:
space:
mode:
authorAnders <anders.broman@ericsson.com>2015-05-19 21:37:04 +0200
committerAnders Broman <a.broman58@gmail.com>2015-05-19 19:53:18 +0000
commit1f34e047e484e271516a74bf6a2e262c859575ce (patch)
tree5aa11e66d30557cf3dc70fd3e34b081b055fb4df /epan/dissectors/packet-gtp.c
parentea3537fb32e2006a52404502df1665239756ff01 (diff)
[GTP]Target identification can have a length of 0.
Change-Id: Ica74dc4ce891f226c05d031c29465d386957edf4 Reviewed-on: https://code.wireshark.org/review/8541 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-gtp.c')
-rw-r--r--epan/dissectors/packet-gtp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/epan/dissectors/packet-gtp.c b/epan/dissectors/packet-gtp.c
index 5c3b30b43e..c096a98a7d 100644
--- a/epan/dissectors/packet-gtp.c
+++ b/epan/dissectors/packet-gtp.c
@@ -5326,6 +5326,9 @@ decode_gtp_target_id(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree
offset = offset + 1;
proto_tree_add_item(ext_tree, hf_gtp_ext_length, tvb, offset, 2, ENC_BIG_ENDIAN);
offset = offset + 2;
+ if (length == 0){
+ return 3 + length;
+ }
/* Quote from specification:
* The Target Identification information element contains the identification of a target RNC. Octets 4-n shall contain a
* non-transparent copy of the corresponding IEs (see subclause 7.7.2) and be encoded as specified in Figure 51 below.