mirror of
https://github.com/open5gs/open5gs.git
synced 2025-11-03 05:23:38 +00:00
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.