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-e1ap.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'epan/dissectors/packet-e1ap.c') diff --git a/epan/dissectors/packet-e1ap.c b/epan/dissectors/packet-e1ap.c index 06878d9585..5bf06f4c20 100644 --- a/epan/dissectors/packet-e1ap.c +++ b/epan/dissectors/packet-e1ap.c @@ -6681,7 +6681,8 @@ dissect_e1ap_GlobalMBSSessionID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *a static int dissect_e1ap_GNB_CU_CP_Name(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; } @@ -6691,7 +6692,8 @@ dissect_e1ap_GNB_CU_CP_Name(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx static int dissect_e1ap_GNB_CU_CP_NameVisibleString(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_VisibleString(tvb, offset, actx, tree, hf_index, - 1, 150, TRUE); + 1, 150, TRUE, + NULL); return offset; } @@ -6841,7 +6843,8 @@ dissect_e1ap_GNB_CU_UP_MBS_Support_Info(tvbuff_t *tvb _U_, int offset _U_, asn1_ static int dissect_e1ap_GNB_CU_UP_Name(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; } @@ -6851,7 +6854,8 @@ dissect_e1ap_GNB_CU_UP_Name(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx static int dissect_e1ap_GNB_CU_UP_NameVisibleString(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_VisibleString(tvb, offset, actx, tree, hf_index, - 1, 150, TRUE); + 1, 150, TRUE, + NULL); return offset; } @@ -10036,7 +10040,8 @@ dissect_e1ap_ULUPTNLAddressToUpdateItem(tvbuff_t *tvb _U_, int offset _U_, asn1_ static int dissect_e1ap_URIaddress(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_VisibleString(tvb, offset, actx, tree, hf_index, - NO_BOUND, NO_BOUND, FALSE); + NO_BOUND, NO_BOUND, FALSE, + NULL); return offset; } -- cgit v1.2.3