From 9fd1b9ac69f5e2bf720b489b5780bb8e7f5a826e Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 16 May 2024 11:59:52 +0200 Subject: [PATCH] Correct buffer size for do_NR_DLInformationTransfer() uper_encode_to_buffer() of asn1c returns the number of BITS that have been encoded; if we use this, we need to calculate the resulting number of bytes (rounding up) to get the right buffer size. Note that do_NR_ULInformationTransfer() uses uper_encode_to_new_buffer() which returns the number of BYTES, hence, in this similar function, we should not modify the return value. --- openair2/RRC/NR/MESSAGES/asn1_msg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.c b/openair2/RRC/NR/MESSAGES/asn1_msg.c index f1d2086086..99c6c11c12 100644 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.c +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.c @@ -941,7 +941,7 @@ uint8_t do_NR_DLInformationTransfer(uint8_t *buffer, ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NR_DL_DCCH_Message, &dl_dcch_msg); LOG_D(NR_RRC, "DLInformationTransfer Encoded %zd bytes\n", r.encoded); // for (int i=0;i