Skip to content

Conversation

sfod
Copy link
Contributor

@sfod sfod commented Jan 8, 2025

Issue #, if available:

In MQTT5 protocol, if subscription fail, SubAck packet not necessarily contains a reason string. In MQTT5 samples, we try to print a SubAck reason string unconditionally, which sometimes crashes samples.
The same applies to publish operations.

Description of changes:

Add check for a reason string value before using it.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sfod sfod merged commit 284eea0 into main Jan 8, 2025
39 of 40 checks passed
@sfod sfod deleted the fix-segfault branch January 8, 2025 23:51
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.

3 participants