aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRody Liu <rody.liu@ericsson.com>2018-09-07 14:01:10 +0200
committerAnders Broman <a.broman58@gmail.com>2018-09-12 14:41:02 +0000
commit0cb87b738982be7477364df49cd535b380a6ad6b (patch)
tree5fd72920977b2b8183831658d259cb87bf970882
parent5c36055d9ba3f78e69a75d432af5f7973d50d55f (diff)
nas_5gs: can't decode 5GS NAS PDU when there are multiple NSSAIs.
Use dummy length in proto_tree_add_subtree_format(), proto_item_set_len() will set the correct length later. Bug: 15120 Change-Id: I7a56f3d1541b75eb53bc03750b6402a8b78a8251 Reviewed-on: https://code.wireshark.org/review/29465 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r--epan/dissectors/packet-nas_5gs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/epan/dissectors/packet-nas_5gs.c b/epan/dissectors/packet-nas_5gs.c
index ab0fa2b..2bb0c2e 100644
--- a/epan/dissectors/packet-nas_5gs.c
+++ b/epan/dissectors/packet-nas_5gs.c
@@ -1076,8 +1076,7 @@ de_nas_5gs_mm_nssai(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
curr_offset = offset;
while ((curr_offset - offset) < len) {
-
- sub_tree = proto_tree_add_subtree_format(tree, tvb, curr_offset, len, ett_nas_5gs_mm_nssai, &item, "S-NSSAI %u", i);
+ sub_tree = proto_tree_add_subtree_format(tree, tvb, curr_offset, 2, ett_nas_5gs_mm_nssai, &item, "S-NSSAI %u", i);
proto_tree_add_item_ret_uint(sub_tree, hf_nas_5gs_mm_length, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &length);
curr_offset++;