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 ReadFrom over-read #109

Merged
merged 2 commits into from
Sep 12, 2022

Conversation

klauspost
Copy link
Contributor

bufio.NewReader usually reads ahead. Limit the input to the expected size.

Return io.ErrUnexpectedEOF when stream is unexpectedly truncated.

Add regression tests (and apparently some Go 1.19 formatting)

Fixes #108

`bufio.NewReader` usually reads ahead. Limit the input to the expected size.

Return `io.ErrUnexpectedEOF` when stream is unexpectedly truncated.

Add regression tests (and apparently some Go 1.19 formatting)

Fixes bits-and-blooms#108
@lemire lemire merged commit bad3f19 into bits-and-blooms:master Sep 12, 2022
@lemire
Copy link
Member

lemire commented Sep 12, 2022

Thanks.

@klauspost klauspost deleted the fix-readfrom-overread branch September 12, 2022 15:25
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.

Overreading with v1.3.1
2 participants