Closed madmo closed 9 months ago
It looks like this is protecting against an issue where the packet-header of the MQTT datagram may be corrupt and indicate a much larger size than we support, which we obviously should not use to index into
self.buffer
, so this is definitely a bug. Thanks for the fix here!Can you please:
* [ ] Add an entry to CHANGELOG.md indicating this defect has been fixed? * [x] Fix the style formatting?
Sure, updated the CHANGELOG. Thanks for reviewing!
Prevents a panic in
fn receive_buffer
if a packet with a too big length is received.