Skip to content

fix: validate PKT-LINE packet size to prevent DoS#1

Open
bopm wants to merge 1 commit into
jtippett:mainfrom
full-stack-biz:fix/pkt-line-dos-validation
Open

fix: validate PKT-LINE packet size to prevent DoS#1
bopm wants to merge 1 commit into
jtippett:mainfrom
full-stack-biz:fix/pkt-line-dos-validation

Conversation

@bopm
Copy link
Copy Markdown

@bopm bopm commented May 4, 2026

Add guard clause to validate that PKT-LINE packet sizes are strictly
greater than 4 bytes. This prevents malformed packets with invalid
sizes from causing negative size calculations that crash the stream parser.

  • Reject packets with size <= 4 bytes
  • Provide specific error message for invalid packet sizes
  • Preserve original error handling for invalid hex values

  Add guard clause to validate that PKT-LINE packet sizes are strictly
  greater than 4 bytes. This prevents malformed packets with invalid
  sizes from causing negative size calculations that crash the stream parser.

  - Reject packets with size <= 4 bytes
  - Provide specific error message for invalid packet sizes
  - Preserve original error handling for invalid hex values
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.

1 participant