Skip to content

Copy the rewritten tag with memcpy, which writes no NUL - #2003

Merged
xroche merged 1 commit into
masterfrom
parse-memcpy
Oct 21, 2026
Merged

xroche merged 1 commit into
masterfrom
parse-memcpy

Conversation

@xroche

@xroche xroche commented Oct 21, 2026

Copy link
Copy Markdown
Owner

The parser overwrites a tag in place with exactly its own length, so it must not write a terminating NUL. memcpy says that, while strncpy made CodeQL flag the size (alert 315), and the bytes copied are the same.

The tag is overwritten in place with exactly its own length, so the
missing terminator is intended. CodeQL flagged the strncpy (alert 315).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
@xroche
xroche enabled auto-merge (squash) October 21, 2026 16:12
@xroche
xroche merged commit 28167dd into master Oct 21, 2026
38 checks passed
@xroche
xroche deleted the parse-memcpy branch October 21, 2026 16:34
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