From 160a4696fafb2158fdeebdc8e41fc2fe91665675 Mon Sep 17 00:00:00 2001 From: Joakim Karlsson Date: Fri, 10 Jan 2020 11:25:50 +0100 Subject: NAS 5GS: correction of QoS Rules with the length of two octets Change-Id: I2d5c2e714067ec3198e24c54145315c009b56198 Reviewed-on: https://code.wireshark.org/review/35729 Petri-Dish: Pascal Quantin Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin --- epan/dissectors/packet-gsm_a_gm.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/epan/dissectors/packet-gsm_a_gm.c b/epan/dissectors/packet-gsm_a_gm.c index 751398dbd0..efda8c3716 100644 --- a/epan/dissectors/packet-gsm_a_gm.c +++ b/epan/dissectors/packet-gsm_a_gm.c @@ -4595,12 +4595,15 @@ de_sm_pco(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g curr_len -= 2; curr_offset += 2; - if (link_dir == P2P_DIR_DL && (prot == 0x0023 || prot == 0x0024)) + if (link_dir == P2P_DIR_DL && (prot == 0x0023 || prot == 0x0024)) { proto_tree_add_item_ret_uint(pco_tree, hf_gsm_a_gm_sm_pco_length2, tvb, curr_offset, 2, ENC_BIG_ENDIAN, &e_len); - else + curr_len -= 2; + curr_offset += 2; + } else { proto_tree_add_item_ret_uint(pco_tree, hf_gsm_a_gm_sm_pco_length, tvb, curr_offset, 1, ENC_NA, &e_len); - curr_len -= 1; - curr_offset += 1; + curr_len -= 1; + curr_offset += 1; + } switch (prot) { -- cgit v1.2.3