diff options
author | Pascal Quantin <pascal@wireshark.org> | 2019-08-30 09:11:55 +0200 |
---|---|---|
committer | Pascal Quantin <pascal@wireshark.org> | 2019-08-30 07:35:02 +0000 |
commit | 98bdb27ebb8a03d22ca4ba2511aade7b0c09f270 (patch) | |
tree | 487ac1c104c02b72e05c73acf9771478d15b17aa | |
parent | eda16ed6250cb28f002c88272dbb69d6f1b42d17 (diff) |
NAS 5GS: fix dissection of 5GSM capability IE
This IE has a variable length to allow future extension.
Change-Id: I158ef8a8aa2f5cace992113a9efeb324beebe1aa
Reviewed-on: https://code.wireshark.org/review/34402
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
-rw-r--r-- | epan/dissectors/packet-nas_5gs.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/epan/dissectors/packet-nas_5gs.c b/epan/dissectors/packet-nas_5gs.c index 619ecf523f..75d34fab6b 100644 --- a/epan/dissectors/packet-nas_5gs.c +++ b/epan/dissectors/packet-nas_5gs.c @@ -2371,10 +2371,11 @@ de_nas_5gs_mm_ul_data_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo */ static guint16 -de_nas_5gs_sm_5gsm_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, - guint32 offset, guint len _U_, +de_nas_5gs_sm_5gsm_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, + guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) { + guint32 curr_offset = offset; static const int * flags[] = { &hf_nas_5gs_spare_b7, @@ -2388,10 +2389,12 @@ de_nas_5gs_sm_5gsm_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, NULL }; + proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, flags, ENC_BIG_ENDIAN); + curr_offset++; - proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_BIG_ENDIAN); + EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_nas_5gs_extraneous_data); - return 1; + return (curr_offset - offset); } /* |