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 overread bug in Reader Skip #8709

Merged

Conversation

JohnMorman
Copy link
Contributor

@JohnMorman JohnMorman commented Nov 7, 2023

Fix bug in Reader skip. When the skip count + current position is 1 >than the current buffer size, skip will "overread" the buffer, setting the position to a point > the buffer size.

This causes the next read to advance the buffer and consume the first byte which the skip should have already consumed but didn't.

Microsoft Reviewers: Open in CodeFlow

… than the current buffer size, skip will "overread" the buffer, setting the position to a point > the buffer size.

This causes the next read to advance the buffer and consume the first byte which the skip should have already consumed but didn't.
@ReubenBond ReubenBond merged commit 3f63791 into dotnet:main Nov 8, 2023
19 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants