Skip to content

Return BufferTooSmall for undersized poll buffers#150

Merged
algesten merged 1 commit into
mainfrom
fix-output-buffer-too-small
Jun 22, 2026
Merged

Return BufferTooSmall for undersized poll buffers#150
algesten merged 1 commit into
mainfrom
fix-output-buffer-too-small

Conversation

@algesten

Copy link
Copy Markdown
Owner

Summary

  • add Output::BufferTooSmall so poll_output can report recoverable undersized caller buffers
  • retain pending application data and queued packets until the caller retries with a large enough buffer
  • document resize-and-retry behavior and cover DTLS 1.2, DTLS 1.3, and auto-sense undersized-buffer cases

Closes #148

Avoid panicking when poll_output receives a buffer smaller than pending application data or queued packets. Return Output::BufferTooSmall with the required size and retain the pending output so callers can resize and retry.

Document the new output variant, add a changelog entry, and cover DTLS 1.2, DTLS 1.3, and auto-sense undersized-buffer cases.
@algesten algesten force-pushed the fix-output-buffer-too-small branch from 4846636 to 50511d5 Compare June 22, 2026 20:10
@algesten algesten merged commit 8f14d6a into main Jun 22, 2026
45 checks passed
@algesten algesten deleted the fix-output-buffer-too-small branch June 22, 2026 20:10
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.

Remote Process-Crash DoS via Reachable assert! in poll_app_data

1 participant