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

checkpath: fix allocation size of string buffer #462

Closed
wants to merge 1 commit into from

Conversation

thesamesam
Copy link
Contributor

strlen's return value isn't enough to be used
directly for (x)malloc; it doesn't include
the null byte at the end of the string.

Fixes: #459
Reported-by: Gary E. Miller
X-Gentoo-Bug: https://bugs.gentoo.org/816900
Signed-off-by: Sam James sam@gentoo.org

strlen's return value isn't enough to be used
directly for (x)malloc; it doesn't include
the null byte at the end of the string.

Fixes: OpenRC#459
Reported-by: Gary E. Miller
X-Gentoo-Bug: https://bugs.gentoo.org/816900
Signed-off-by: Sam James <sam@gentoo.org>
@williamh williamh closed this in bb83341 Oct 8, 2021
williamh pushed a commit that referenced this pull request Oct 8, 2021
strlen's return value isn't enough to be used
directly for (x)malloc; it doesn't include
the null byte at the end of the string.

X-Gentoo-Bug: 816900
X-Gentoo-Bug-URL: https://bugs.gentoo.org/816900
Fixes: #459
Fixes: #462
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.

checkpath -- free(): invalid pointer
1 participant