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: segfault when getcwd is called with null buf #5

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

cassandracomar
Copy link

ruby and I'm guessing other apps pass a null buffer to getcwd, expecting to use the return value rather than having data written into the destination buffer. this obviously causes an illegal access. this patch fixes it by having fakedir's getcwd check if the destination buffer is valid and allocating a new buffer with strdup if it isn't.

ruby and I'm guessing other apps pass a null buffer to getcwd, expecting
to use the return value rather than having data written into the
destination buffer. this obviously causes an illegal access. this patch
fixes it by having fakedir's getcwd check if the destination buffer is
valid and allocating a new buffer with strdup if it isn't.
@Thesola10 Thesola10 merged commit a2bd8d0 into nixie-dev:main Aug 12, 2024
Thesola10 added a commit to nixie-dev/nixie that referenced this pull request Aug 12, 2024
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