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

Avoid fallback routine buffer overruns #46

Merged
merged 8 commits into from
May 22, 2023

Conversation

mborland
Copy link
Member

Closes: #45

std::strtod does not accept a size argument so when parsing a buffer with valid contents past last the results would be incorrect. Locally ran the benchmarks from #44 that caused the linked issue, and they are resolved.

@mborland
Copy link
Member Author

@pdimov I bumped up the statically allocated array size form 256 to 1024, and added handling for a dynamic array using malloc. I also removed all of the default initializations like you asked. Let me know if you find anything else.

@pdimov
Copy link
Member

pdimov commented May 22, 2023

You should merge/rebase the develop branch here to pick up my new test.

@mborland
Copy link
Member Author

You should merge/rebase the develop branch here to pick up my new test.

The force push was a rebase onto develop so I have it, and there are no new failures.

@mborland mborland merged commit 212cdf9 into boostorg:develop May 22, 2023
@mborland mborland deleted the from_chars_failures branch May 22, 2023 14:41
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.

Double precision from_chars parsing incorrectly on reused buffer
2 participants