mirror of
https://github.com/open5gs/open5gs.git
synced 2025-10-23 07:41:57 +00:00
- Added explicit size checks for critical IE fields (PLMNIdentity, TAC, GTP-TEID, Cell-ID, UE security capability algorithms, etc.) before memcpy() operations. - When size mismatch is detected, log an error and return an Error Indication (or Setup Failure) with appropriate protocol cause (semantic_error or message_not_compatible_with_receiver_state). - Introduced s1ap_send_error_indication1(enb_ue_t *enb_ue, ...) as a helper for cases where ENB UE context is available directly. s1ap_send_error_indication2(mme_ue_t *mme_ue, ...) now delegates to the new function, reducing code duplication. - Replaced ogs_assert() checks with graceful error handling paths to avoid abnormal process termination. This improves robustness against malformed or non-compliant NGAP/S1AP messages and prevents potential AMF/MME crashes.