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 #1108 (os.tmpname crashes redbean) #1180

Merged
merged 2 commits into from
May 20, 2024
Merged

Conversation

mrdomino
Copy link
Collaborator

No description provided.

@mrdomino mrdomino requested a review from pkulchenko May 18, 2024 23:27
At least on macOS, `strlen(getenv("TMPDIR"))` is 50. We now allow a /tmp
that takes up to 120 or so bytes to spell. Instead of overflowing, we do
a bounds check and the function fails successfully on even longer /tmps.

Fixes jart#1108 (os.tmpname crashes redbean)
Copy link
Owner

@jart jart left a comment

Choose a reason for hiding this comment

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

Please update README.cosmo

@mrdomino
Copy link
Collaborator Author

Done

@mrdomino mrdomino merged commit 65c9b28 into jart:master May 20, 2024
5 checks passed
@mrdomino mrdomino deleted the tmpnam branch May 20, 2024 07:46
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.

None yet

2 participants