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

Fix index out of bouds error #45

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

andoriyu
Copy link

@andoriyu andoriyu commented Nov 6, 2024

Noticed that when I juse large MQTT payloads (i.e. larger than link MTU) writting to recv_buffer causes errors like:

ERROR ====================== PANIC ====================== └─ <mod> @ └─ <invalid location: defmt frame-index: 81>:0 ERROR panicked at /home/andoriyu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rust-mqtt-0.3.0/src/client/raw_client.rs:538:48: range end index 66788 out of range for slice of length 64000</mod>

Index values I was getting made no sense: I knew the exact size of a MQTT notification and it was smaller than 66788. Increasing a recv_buffer would just cause the same error, just after more iterations.

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