Skip to content

fix: reject frames exceeding maxFrameSize#29

Merged
fionera merged 1 commit into
DropMorePackets:masterfrom
willholley:fix/frame-length-validation
Jun 16, 2026
Merged

fix: reject frames exceeding maxFrameSize#29
fionera merged 1 commit into
DropMorePackets:masterfrom
willholley:fix/frame-length-validation

Conversation

@willholley

@willholley willholley commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

In production we saw an error (perhaps due to network corruption):

spop: panic: runtime error: slice bounds out of range [:369295622] with capacity 65535

This PR prevents the panic by adding validation in frame.ReadFrom() to reject oversized frames before buffer allocation.

Tests verify rejection of oversized frames, acceptance at boundary, and rejection one byte over limit.

Production panic: frame length 369295622 exceeded buffer capacity 65535.

Add validation in frame.ReadFrom() to reject oversized frames before
buffer allocation.

Tests verify rejection of oversized frames, acceptance at boundary,
and rejection one byte over limit.
@fionera

fionera commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Nice! Thanks for the fix!

@fionera fionera merged commit ea665cb into DropMorePackets:master Jun 16, 2026
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