open5gs/lib
Sukchan Lee 345800ba94 [SMF] Improve robustness of PCO parsing and building by replacing fatal assertions with error handling (#3969)
Previously, malformed Protocol Configuration Options (PCO) data would trigger
ogs_assert failures in both the generic parser and SMF build routines,
causing the SMF process to abort unconditionally.

This commit replaces those fatal assertions with conditional checks:

In ogs_pco_parse(), switch from ogs_assert(size == data_len) to
ogs_expect(size == data_len), allowing the function to return gracefully.

In SMF's PCO build (smf_pco_build) and all downstream build paths
(including GN, GSM, S5C modules), replace ogs_assert(pco_len > 0)
with explicit if (pco_len <= 0) checks that:

Ensure that malformed or incomplete PCOs no longer crash the process,
but instead are handled cleanly so the network function can continue operating.
2025-07-09 21:28:08 +09:00
..
app [DBI] Improve YAML policy config by adding SUPI range filtering 2025-02-05 21:56:15 +09:00
asn1c [CSFB] Fix Location Update for non-EPS (#3381) 2024-11-05 16:37:45 +09:00
core [AMF] Follow-up on #3380 2025-05-31 20:51:41 +09:00
crypt clang scan-build static analysis findings/resolutions (#3387) 2024-08-16 16:42:12 +09:00
dbi [HSS/DBI] Follow-up on #3829 2025-04-05 18:26:32 +09:00
diameter Typos Fix 2025-04-19 20:45:25 +09:00
gtp [SMF] If GTPU conf has advert addr, use it in up2cp FAR 2025-06-10 17:06:27 +09:00
ipfw [ipfw2] override errx() to prevent exit on error (#3840) 2025-05-09 16:47:42 +09:00
metrics Update context.c 2025-02-13 20:20:34 +09:00
nas [NAS] add support for 30-seconds unit for GPRS3 timer 2025-03-21 17:52:12 +09:00
ngap [MME/AMF] Fixed crash following Handover Request (#3014) 2024-02-29 23:02:38 +09:00
pfcp Always make fqdn a NULL terminated string 2025-04-17 17:14:15 +09:00
proto [SMF] Improve robustness of PCO parsing and building by replacing fatal assertions with error handling (#3969) 2025-07-09 21:28:08 +09:00
s1ap [Release-17] Upgrade S1AP/NGAP to v17.3.9 2023-02-21 21:48:06 +09:00
sbi [SBI] guard against NULL http->content in parse_multipart (#3942) 2025-06-28 10:12:54 +09:00
sctp [PFCP] Refactor PFCP address handling (#3431) 2025-01-11 20:33:02 +09:00
tun [AMF] Follow-up on #3880 2025-06-17 17:34:18 +09:00
meson.build [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00