[AMF] fix memory overflow
Some checks are pending
Meson Continuous Integration / Build and Test on Ubuntu Latest (push) Waiting to run

Overflow occurred when transferring UE context between AMF's. The buffer
should include the space for the prefix byte.
This commit is contained in:
Bostjan Meglic 2026-03-25 10:09:45 +01:00 committed by Sukchan Lee
parent 318eeb49a7
commit 634326fb2b

View file

@ -1634,7 +1634,7 @@ static ogs_nas_ue_security_capability_t
memset(&ue_security_capability, 0, sizeof(ue_security_capability));
ue_security_capability_octets_string =
(char*) ogs_calloc(sizeof(ue_security_capability), sizeof(char));
(char*) ogs_calloc(sizeof(ue_security_capability) + 1, sizeof(char));
ogs_assert(ue_security_capability_octets_string);
ogs_base64_decode(ue_security_capability_octets_string, encoded);