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 off-by-one error in parser buffer size #243

Merged
merged 2 commits into from
Jan 2, 2025

Conversation

Flamefire
Copy link
Contributor

When parsing a value with the maximum number of digits the last digit will be truncated and the exponent increased instead.

This change allows to parse e.g. <UINT64_MAX>[e0] correctly.

When parsing a value with the maximum number of digits the last digit
will be truncated and the exponent increased instead.
This change allows to parse e.g. `<UINT64_MAX>e0` correctly.
Copy link

codecov bot commented Dec 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.77%. Comparing base (8fbdb8a) to head (73eb4f8).
Report is 3 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #243      +/-   ##
===========================================
+ Coverage    94.76%   94.77%   +0.01%     
===========================================
  Files           69       69              
  Lines         9031     9051      +20     
===========================================
+ Hits          8558     8578      +20     
  Misses         473      473              
Files with missing lines Coverage Δ
include/boost/charconv/detail/parser.hpp 79.79% <100.00%> (ø)
test/test_parser.cpp 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8fbdb8a...73eb4f8. Read the comment docs.

Copy link
Member

@mborland mborland left a comment

Choose a reason for hiding this comment

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

I don't entirely remember why I took off 1 from the buffer size initially, but this change looks good to me. Thanks.

@mborland mborland merged commit 26359d7 into boostorg:develop Jan 2, 2025
70 checks passed
@Flamefire Flamefire deleted the off-by-one branch January 2, 2025 15:02
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