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

Use correct string constructor for non-null-terminated range #204

Merged

Conversation

jefftrull
Copy link
Collaborator

There is no guarantee (indeed, it is unlikely) that data within the scanner buffer will be null terminated and so the constructor that accepts a pointer and a count is appropriate.

This is one of the issues revealed by the BOOST_WAVE_BSIZE variation experiment

There is no guarantee (indeed, it is unlikely) that data within the
scanner buffer will be null terminated and so the constructor that
accepts a pointer and a count is appropriate.
@jefftrull
Copy link
Collaborator Author

t_5_001 reveals this bug with BOOST_WAVE_BSIZE=43 and the address sanitizer turned on

@jefftrull jefftrull requested a review from hkaiser January 29, 2024 00:47
Copy link
Collaborator

@hkaiser hkaiser left a comment

Choose a reason for hiding this comment

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

Excellent catch! LGTM! Thanks.

@jefftrull jefftrull merged commit f9c302d into boostorg:develop Jan 29, 2024
7 checks passed
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