From f18a3ddd526fc52b0e23ef67992f529a9a884c87 Mon Sep 17 00:00:00 2001 From: John Thacker Date: Sat, 29 Apr 2023 14:29:50 -0400 Subject: PER, asn2wrs: Handle VAL_PTR for known multiplier string types Have the single octet known multiplier string types (IA5String, NumericString, PrintableString, VisibleString, the yet unsupported ISO646String) support returning the tvb containing the item in a VAL_PTR if they don't have a permitted alphabet. We currently handle a VAL_PTR of one of those types if they do have a permitted alphabet. Note that this also applies to UTCTime and GeneralizedTime, since under the hood we treat those as VisibleStrings anyway. It does *not* apply to BMPString (UCS2) nor UniversalSTring (UCS4), even though those are known multiplier string types. This should fix handling of ENBname and MMEname in S1AP as well. Related to #19036 --- epan/dissectors/packet-m2ap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'epan/dissectors/packet-m2ap.c') diff --git a/epan/dissectors/packet-m2ap.c b/epan/dissectors/packet-m2ap.c index 2b0a7ddd30..38ca7ff3f0 100644 --- a/epan/dissectors/packet-m2ap.c +++ b/epan/dissectors/packet-m2ap.c @@ -1307,7 +1307,8 @@ dissect_m2ap_ENB_MBMS_M2AP_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act static int dissect_m2ap_ENBname(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_PrintableString(tvb, offset, actx, tree, hf_index, - 1, 150, TRUE); + 1, 150, TRUE, + NULL); return offset; } @@ -1928,7 +1929,8 @@ dissect_m2ap_MCCHrelatedBCCH_ExtConfigPerMBSFNArea_Item(tvbuff_t *tvb _U_, int o static int dissect_m2ap_MCEname(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_PrintableString(tvb, offset, actx, tree, hf_index, - 1, 150, TRUE); + 1, 150, TRUE, + NULL); return offset; } -- cgit v1.2.3