Skip to content

Fix strncpy buffer overflow in OnConVarChanged#2458

Merged
Headline merged 1 commit into
alliedmodders:masterfrom
SCP-076:cvar=fix
May 13, 2026
Merged

Fix strncpy buffer overflow in OnConVarChanged#2458
Headline merged 1 commit into
alliedmodders:masterfrom
SCP-076:cvar=fix

Conversation

@SCP-076
Copy link
Copy Markdown
Contributor

@SCP-076 SCP-076 commented May 13, 2026

strncpy does not append '\0' when the source is >= sizeof(dst).
If a convar value is 512+ chars, PushString(newValue) leaks stack garbage into SP callbacks' newValue parameter.

Copy link
Copy Markdown
Member

@Headline Headline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one

@Headline Headline merged commit 5288927 into alliedmodders:master May 13, 2026
4 checks passed
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.

2 participants