Repository navigation
Conversation
Validate the proposed window size before assigning it, so a rejected local increment cannot corrupt connection or stream receive credit. Exercise both paths with empty and nonempty wire buffers, distinct current and maximum windows, pending processed bytes, a subsequent valid increment, and the exact maximum boundary. The same defect was previously proposed in withdrawn PR python-hyper#1335. This change was reproduced and derived from current upstream source; that patch was not fetched, applied, or cherry-picked. Related-to: python-hyper#1335
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
increment_flow_control_window()raisesFlowControlErrorwhen a local increment would exceed2**31 - 1, but the window manager has already stored the overflowing value. No WINDOW_UPDATE is sent, so local credit diverges from the peer and subsequent valid increments fail.Validate the proposed size before assigning it. Four regressions cover connection and stream windows, pending PING output, consumed/acknowledged data, a valid increment after rejection, and the exact maximum boundary. They verify that rejected updates preserve current credit, the replenishment maximum, processed-byte accounting and queued bytes.
Validation on macOS arm64 / Python 3.12.14:
This revisits the defect described by adenzhou1350 in withdrawn PR #1335. The implementation and tests were derived from current upstream source after reproducing it. It is separate from #1349 and does not alter handling of invalid updates received from a peer.
AI assistance: OpenAI Codex implemented the change, ran validation and drafted this description.