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 buffer overflow in soundex library #59

Merged
merged 1 commit into from
Dec 15, 2022

Conversation

skeeto
Copy link
Contributor

@skeeto skeeto commented Dec 12, 2022

No space was allocated for the null terminator in the result buffer. ASan catches this error when running the tests.

There's a potential issue that d (and i) will overflow, computing an incorrect result, except that they're tied to a VLA and the program would crash via stack overflow well before that point. Especially considering the VLAs (#58), this soundex library is questionable and probably shouldn't be used on untrusted input without careful review and fixes, and VLA removal.

No space was allocated for the null terminator in the result buffer.
ASan catches this error when running the tests.
@nalgeon nalgeon merged commit 83404d6 into nalgeon:main Dec 15, 2022
@nalgeon
Copy link
Owner

nalgeon commented Dec 15, 2022

Thanks! Released in 0.17.2 together with PRs #57 and #58.

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