From bef72dd7479185e3c70f5997c7bd18f986cde79c Mon Sep 17 00:00:00 2001 From: Angelo Athanassopoulos Date: Thu, 27 Oct 2022 18:44:36 +0200 Subject: [PATCH] PSEA - SABOX fix - changed the max accumulated apn length --- .../NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.c | 2 +- .../NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.h | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/openair3/NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.c b/openair3/NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.c index cbcd767c11..ee52e1f9c0 100644 --- a/openair3/NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.c +++ b/openair3/NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.c @@ -168,7 +168,7 @@ void capture_pdu_session_establishment_accept_msg(uint8_t *buffer, uint32_t msg_ LOG_T(NAS, "PDU SESSION ESTABLISHMENT ACCEPT - Received DNN IE\n"); psea_msg.dnn_ie.dnn_length = *(buffer + offset++); uint8_t i=0; - char apn[20]; + char apn[APN_MAX_LEN]; while (*(buffer + offset + i) != ASCII_ACK) { apn[i] = *(buffer + offset + i); diff --git a/openair3/NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.h b/openair3/NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.h index ca92e54418..393d2cb4b6 100644 --- a/openair3/NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.h +++ b/openair3/NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.h @@ -58,6 +58,13 @@ #define ASCII_ACK 0x06 /* Delimiter in the DNN IEI */ +/* DNN - APN + * TS 23.003 9.1 + * The APN is composed of two parts, the APN Network Identifier (9.1.1) & The APN Operator Identifier (9.1.2). + * The accumulated max length of APN is 100 bytes. + */ +#define APN_MAX_LEN 100 + /* Mandatory Presence IE - TS 24.501 Table 8.3.2.1.1 */ typedef struct packet_filter_create_qos_rule_s {