Skip to content

fix reading beyond input buffer#933

Merged
grisumbras merged 1 commit intoboostorg:developfrom
grisumbras:fix/suspend-after-comment
Aug 25, 2023
Merged

fix reading beyond input buffer#933
grisumbras merged 1 commit intoboostorg:developfrom
grisumbras:fix/suspend-after-comment

Conversation

@grisumbras
Copy link
Copy Markdown
Member

This fixes a rare case when the parser first suspends inside a comment, then is given input exactly up to the newline character. Before the fix it proceeded to read past the end of the buffer or hit an assert.

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 24, 2023

Codecov Report

Merging #933 (2acdb29) into develop (f48b6dd) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #933   +/-   ##
========================================
  Coverage    92.95%   92.95%           
========================================
  Files           85       85           
  Lines         8047     8052    +5     
========================================
+ Hits          7480     7485    +5     
  Misses         567      567           
Files Changed Coverage Δ
include/boost/json/basic_parser.hpp 100.00% <ø> (ø)
include/boost/json/basic_parser_impl.hpp 98.44% <100.00%> (+<0.01%) ⬆️

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 f48b6dd...2acdb29. Read the comment docs.

@cppalliance-bot
Copy link
Copy Markdown

This fixes a rare case when the parser first suspends inside a comment,
then is given input exactly up to the newline character. Before the fix
it proceeded to read past the end of the buffer or hit an assert.
@grisumbras grisumbras force-pushed the fix/suspend-after-comment branch from eeeef63 to 2acdb29 Compare August 25, 2023 16:50
@grisumbras grisumbras merged commit 2acdb29 into boostorg:develop Aug 25, 2023
@grisumbras grisumbras deleted the fix/suspend-after-comment branch August 25, 2023 17:15
@cppalliance-bot
Copy link
Copy Markdown

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