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

Don't double-count buffer consumption in close length checks #1768

Merged
merged 1 commit into from
Feb 25, 2024

Conversation

Ralith
Copy link
Collaborator

@Ralith Ralith commented Feb 24, 2024

PacketBuilder::max_size previously subtracted out the start index and header size of the packet, and therefore described the admissible size of the packet's frames. However, most of our logic operates in terms of absolute buffer positions instead. This was confusing, and led to erroneous double-counting of space use in close packets.

Discovered while drafting #1767.

PacketBuilder::max_size previously subtracted out the start index and
header size of the packet, and therefore described the admissible size
of the packet's frames. However, most of our logic operates in terms
of absolute buffer positions instead. This was confusing, and led to
erroneous double-counting of space use in close packets.
@Ralith Ralith merged commit cd69fa5 into main Feb 25, 2024
8 checks passed
@Ralith Ralith deleted the cleanup-max-size branch February 25, 2024 08:04
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