Skip to content

Fix BrokerHandle_Connect null check#477

Merged
dgarske merged 1 commit intowolfSSL:masterfrom
embhorn:bh_connect_fix
Mar 20, 2026
Merged

Fix BrokerHandle_Connect null check#477
dgarske merged 1 commit intowolfSSL:masterfrom
embhorn:bh_connect_fix

Conversation

@embhorn
Copy link
Copy Markdown
Member

@embhorn embhorn commented Mar 20, 2026

wraps the property assignment block with BROKER_STR_VALID(bc->client_id)

@embhorn embhorn self-assigned this Mar 20, 2026
Copilot AI review requested due to automatic review settings March 20, 2026 16:31
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 fixes a potential null/invalid access in the broker’s MQTT v5 CONNECT handling by guarding the CONNACK Assigned Client Identifier property population with a BROKER_STR_VALID(bc->client_id) check.

Changes:

  • Wrap MQTT_PROP_ASSIGNED_CLIENT_ID property creation/assignment in BROKER_STR_VALID(bc->client_id) to prevent XSTRLEN(bc->client_id) on an invalid value.

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

@embhorn embhorn requested a review from dgarske March 20, 2026 19:36
@embhorn embhorn assigned dgarske and unassigned embhorn Mar 20, 2026
@dgarske dgarske merged commit eb14efd into wolfSSL:master Mar 20, 2026
39 checks passed
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