Skip to content

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

Merged
Ralith merged 1 commit into
mainfrom
cleanup-max-size
Feb 25, 2024
Merged

Don't double-count buffer consumption in close length checks#1768
Ralith merged 1 commit into
mainfrom
cleanup-max-size

Conversation

@Ralith

@Ralith Ralith commented Feb 24, 2024

Copy link
Copy Markdown
Collaborator

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
@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