Skip to content

Prevent inflight array index crash and precondition failure on password buffer #24

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tstoegi
Copy link

@tstoegi tstoegi commented Mar 26, 2025

Summary

This pull request includes two independent but related fixes:

  1. Fix index out-of-range crash in MQTTRequestHandler.channelRead

    • Replaces mutation of entriesInflight during iteration with a compactMap to safely remove completed entries without corrupting indices.
  2. Fix potential preconditionFailure when writing CONNECT packet password

    • Ensures the password buffer has a valid reader index and is not empty before passing to writeMQTTDataWithLength

Thank you.

Tobias

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