Skip to content

Fixes for various fenrir issues#473

Merged
dgarske merged 12 commits intowolfSSL:masterfrom
embhorn:fenrir_3.16
Mar 18, 2026
Merged

Fixes for various fenrir issues#473
dgarske merged 12 commits intowolfSSL:masterfrom
embhorn:fenrir_3.16

Conversation

@embhorn
Copy link
Copy Markdown
Member

@embhorn embhorn commented Mar 17, 2026

Fixes for:

  • Doc f487 - props lock
  • Fix f793 - return on MqttPacket_Write failure
  • Fix f795 - SN non-blocking read issue
  • Fix f796 - SN NPD
  • Fix f806 - MqttDecode_Auth reason code issue
  • Fix f807-810 SN Decode check buf
  • Fix f798 - SN_Encode_Publish topic_name pointer access
  • Fix f799 - SN_Decode_SubscribeAck wrong error code
  • Fix f800 - SN_Decode_Publish length calc

@embhorn embhorn self-assigned this Mar 17, 2026
Copilot AI review requested due to automatic review settings March 17, 2026 21:53
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses a set of MQTT v5 and MQTT-SN correctness/stability issues (buffer validation, non-blocking read behavior, error propagation, and property init/shutdown documentation).

Changes:

  • Add/clarify thread-safety documentation for MQTT v5 property init/shutdown APIs.
  • Harden multiple MQTT-SN decode paths with additional bounds checks and fix decode/encode edge cases (topic id access, publish length calc, subscribe-ack error code).
  • Fix MQTT v5 AUTH decode logic and ensure early return on write failures in MQTT-SN client flows.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
wolfmqtt/mqtt_packet.h Documents single-thread init/shutdown requirements for MQTT v5 property APIs.
src/mqtt_sn_packet.c Adds bounds checks to MQTT-SN decoders and fixes publish encoding/length and packet read behavior.
src/mqtt_sn_client.c Returns immediately on packet write failure in several MQTT-SN client operations.
src/mqtt_packet.c Fixes MQTT v5 AUTH decoding behavior and documents property init/shutdown semantics.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread src/mqtt_sn_client.c
Comment thread src/mqtt_sn_client.c
Comment thread src/mqtt_sn_client.c
Copilot AI review requested due to automatic review settings March 18, 2026 16:12
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR applies a set of targeted fixes across MQTT-SN and MQTT v5 AUTH/property handling, addressing multiple fenrir-reported issues and improving robustness around packet decoding and non-blocking I/O paths.

Changes:

  • Add thread-usage documentation for MQTT v5 property init/shutdown APIs.
  • Harden MQTT-SN decoders (length checks, correct error codes, safer topic-id access, publish length calculation).
  • Adjust MQTT-SN packet read logic and MQTT v5 AUTH decode behavior (including Remaining Length = 0 semantics).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
wolfmqtt/mqtt_packet.h Documents required single-thread init/shutdown semantics for MQTT v5 property helpers.
src/mqtt_sn_packet.c Adds MQTT-SN decode bounds checks and refactors publish decode and packet read logic.
src/mqtt_sn_client.c Ensures early returns on MqttPacket_Write failure in selected SN client operations.
src/mqtt_packet.c Fixes MQTT v5 AUTH decode semantics and adds property init/shutdown comments in implementation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread src/mqtt_sn_packet.c
Comment thread src/mqtt_sn_packet.c
Comment thread src/mqtt_packet.c
Comment thread src/mqtt_packet.c
@dgarske dgarske merged commit a7841b6 into wolfSSL:master Mar 18, 2026
33 checks passed
@embhorn embhorn deleted the fenrir_3.16 branch April 21, 2026 16:12
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