Skip to content

BUG: Bound the aux_file copy by sizeof rather than a repeated 24 - #98

Open
hjmjohnson wants to merge 1 commit into
masterfrom
pr/fix-stringop-truncation
Open

hjmjohnson wants to merge 1 commit into
masterfrom
pr/fix-stringop-truncation

Conversation

@hjmjohnson

Copy link
Copy Markdown
Member

Re-submission of #46, reverted from master on 2026-09-24 so it can be
reviewed before merging. Content is unchanged from the original.

Base: master. Independent: nothing has to land before it.

Commits
  • BUG: Bound the aux_file copy by sizeof rather than a repeated 24

Ordering for all the re-submitted work is tracked in #84.

strncpy writes no terminator when the source fills the destination, so
the copy is safe only because of the line that follows it, which is
what -Wstringop-truncation reports.

Copying at most sizeof(dest) - 1 makes the call safe on its own and
takes the size from the buffer rather than a literal repeated twice.

(cherry picked from commit 5c1665c)
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.

3 participants