Skip to content

Cov fixes 02162026#467

Merged
dgarske merged 5 commits intowolfSSL:masterfrom
embhorn:cov_fixes_02162026
Feb 16, 2026
Merged

Cov fixes 02162026#467
dgarske merged 5 commits intowolfSSL:masterfrom
embhorn:cov_fixes_02162026

Conversation

@embhorn
Copy link
Copy Markdown
Member

@embhorn embhorn commented Feb 16, 2026

Address coverity issues in 02162026 report

@embhorn embhorn marked this pull request as ready for review February 16, 2026 15:19
@embhorn embhorn self-assigned this Feb 16, 2026
@embhorn embhorn requested a review from philljj February 16, 2026 15:35
@embhorn embhorn assigned wolfSSL-Bot and unassigned embhorn Feb 16, 2026
@dgarske dgarske requested a review from Copilot February 16, 2026 20:34
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 Coverity static analysis issues identified in the 02162026 report by adding defensive checks for buffer overflows and error handling in MQTT socket operations and packet encoding functions.

Changes:

  • Added bounds checking to prevent buffer overflows in read/write operations
  • Added error handling for encoding functions that can return negative error codes
  • Added validation to ensure decoded values are non-negative before using them in calculations

Reviewed changes

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

File Description
src/mqtt_socket.c Added bounds checks to prevent rc from exceeding available buffer space in read/write operations
src/mqtt_packet.c Added error handling for MqttEncode_Vbi and MqttEncode_Props return values, and validation for MqttDecode_String
examples/mqttnet.c Added bounds checks in network read/write operations to prevent buffer overflows

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

Comment thread src/mqtt_socket.c
Comment thread src/mqtt_socket.c
Comment thread src/mqtt_socket.c
Comment thread src/mqtt_socket.c
Comment thread examples/mqttnet.c
Comment thread examples/mqttnet.c
Comment thread examples/mqttnet.c
Comment thread examples/mqttnet.c
@embhorn embhorn removed their assignment Feb 16, 2026
@embhorn embhorn requested a review from Copilot February 16, 2026 21:05
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

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


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

Comment thread examples/mqttnet.c
Comment thread examples/mqttnet.c
Comment thread src/mqtt_socket.c
Comment thread src/mqtt_socket.c
@dgarske dgarske merged commit 4709b93 into wolfSSL:master Feb 16, 2026
26 checks passed
@embhorn embhorn deleted the cov_fixes_02162026 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.

4 participants