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

Enforce discard limits on readers #790

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

emcfarlane
Copy link
Contributor

@emcfarlane emcfarlane commented Oct 25, 2024

This enforces limits on discard to avoid unbounded reads. Where resources were already exhausted no further reads are done and discards have been removed. These discards were an optimization to reuse connections. When a stream is partially read all subsequent reads will now return EOF errors to avoid reading in a corrupted state.

Fixes #620

@emcfarlane emcfarlane requested a review from jhump October 25, 2024 21:51
This enforces limits on discard to avoid unbounded reads. Where
resources were already exhausted no further reads are done and discards
have been removed. These discards were an optimization to reuse
connections. When a stream is partially read all subsequent reads will
now return EOF errors to avoid reading in a corrupted state.

Signed-off-by: Edward McFarlane <[email protected]>
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.

Unenforced discard limits
1 participant