Skip to content

Some safety fixes#101

Open
sleepybishop wants to merge 2 commits into
USNavalResearchLaboratory:masterfrom
sleepybishop:safety
Open

Some safety fixes#101
sleepybishop wants to merge 2 commits into
USNavalResearchLaboratory:masterfrom
sleepybishop:safety

Conversation

@sleepybishop

Copy link
Copy Markdown

Hello, I ran into a few safety snags while interating norm into a project. Hopefully these are helpful.

  • Replaced manual string bounds tracking and concatenation (strncpy, strncat, sprintf) with
    safe snprintf calls in normApi.cpp and normApp.cpp. This prevents potential buffer overflows and ensures path lengths safely respect PATH_MAX.
  • Added a missing lower-bound validation check in normMessage.cpp to verify that header_length is at least
    header_length_base before proceeding. This prevents out-of-bounds memory reads on malformed packets.
  • Updated a deprecated waf API call (ctx.parser.add_argument_group to ctx.add_option_group) in wscript for
    compatibility with modern waf versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant