Skip to content
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

MQTT subscribe Remaining Length encoding is incorrect #969

Open
peterhinch opened this issue Jan 21, 2025 · 0 comments
Open

MQTT subscribe Remaining Length encoding is incorrect #969

peterhinch opened this issue Jan 21, 2025 · 0 comments

Comments

@peterhinch
Copy link
Contributor

See this discussion for background, also MQTT spec V3.1.1 section 2.2.3.

This may be academic as its main impact is if the topic field is long. This is to record the existence of the issue.

The current encoding stores Remaining Length in a byte. It should be stored as a Variable Byte Integer as per .publish. This will cause a failure if Remaining Length is greater than 127, therefore imposing a limit on the length of the topic field.

I can submit a PR if the maintainers think this is worth fixing.

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

No branches or pull requests

1 participant