Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix off-by-one error in escape_string() #680

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

selvanair
Copy link
Collaborator

Github: fixes #548

@selvanair selvanair assigned selvanair and unassigned selvanair Apr 17, 2024
@selvanair selvanair mentioned this pull request Apr 17, 2024
Copy link
Member

@lstipakov lstipakov left a comment

Choose a reason for hiding this comment

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

Tested that

    char* s = escape_string("hello ");
    free(s);

causes heap corruption (we move more bytes than needed), and this indeed fixes it.

@lstipakov lstipakov merged commit fdf457d into OpenVPN:master Apr 18, 2024
10 checks passed
@selvanair selvanair deleted the memmove-fix branch April 21, 2024 17:55
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.

Openvpn GUI crashes. The connection remains.
2 participants