Skip to content
Snippets Groups Projects

ASN_SEQUENCE_ADD return code was checked only in 0.5% of calls

Merged Thomas Laurent requested to merge fix-check-return-ASN_SEQUENCE_ADD into develop
All threads resolved!

ASN_SEQUENCE_ADD return code was checked only in 0.5% of calls, existing errors not detected by sanitize address

example found: config_pdsch() => pdsch_Config->tci_StatesToAddModList=calloc(...) is missing
So, the call to ASN1_SEQUENCE_ADD returns -1 but we miss it
Weird: as pdsch_Config->tci_StatesToAddModList is NULL the call using dsch_Config->tci_StatesToAddModList->list should perform SEGV
but it doesn't (even with --sanitize-address)

Merge request reports

Checking pipeline status.

Approval is optional

Merged by Robert SchmidtRobert Schmidt 2 years ago (Jan 14, 2023 8:40am UTC)

Merge details

  • Changes merged into develop with 214aa505.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
    • Resolved by Robert Schmidt

      Review by @schmidtr

      Recommendations

      • I really like this, we check for the return code everywhere
      • I have a problem with the new file oai_asn1.h: as I wrote, the original asn1_utils.h files are layer-specific, so maybe just make in unique names
      • in 99% of cases where you include oai_asn1.h, you do it to get the asn1cSeqAdd() macro, so maybe include common/utils/asn1_conversions.h directly? you might change that file's name to oai_asn1.h though
  • Robert Schmidt added 2 commits

    added 2 commits

    • c6d28099 - Review comments
    • 06dee0f5 - Shorten IP address buffer to avoid strncpy() warning

    Compare with previous version

  • removed 4G-LTE label

  • removed 5G-NR label

  • Robert Schmidt added 1 commit
  • Robert Schmidt added 2 commits

    added 2 commits

    • 9a789dbb - ASN_SEQUENCE_ADD return code was checked only in 0.5% of calls, existing...
    • 21ef822c - Shorten IP address buffer to avoid strncpy() warning

    Compare with previous version

  • Robert Schmidt resolved all threads

    resolved all threads

  • I squashed the commits, no other changes. If CI passes, I will mark it as ok.

  • changed milestone to %OK_TO_BE_MERGED

  • Robert Schmidt mentioned in merge request !1906 (merged)

    mentioned in merge request !1906 (merged)

  • Robert Schmidt mentioned in commit 214aa505

    mentioned in commit 214aa505

  • Please register or sign in to reply
    Loading