Skip to content

Fix issues addressed by static analysis#967

Merged
ejohnstown merged 3 commits intowolfSSL:masterfrom
yosuke-wolfssl:f_issues
May 8, 2026
Merged

Fix issues addressed by static analysis#967
ejohnstown merged 3 commits intowolfSSL:masterfrom
yosuke-wolfssl:f_issues

Conversation

@yosuke-wolfssl
Copy link
Copy Markdown
Contributor

This PR fixes the following minor issues:

  • Fix Mac comparison in VerifyMac for HMAC failure case
  • Delete the incorrect statement in GetOpenSshKey
  • Fix cursor mode handling in wolfSSH_DoControlSeq

Addressed by f_520, f_521 and f_522

@yosuke-wolfssl yosuke-wolfssl self-assigned this May 8, 2026
Copilot AI review requested due to automatic review settings May 8, 2026 08:04
Copy link
Copy Markdown
Contributor

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 pull request addresses a few static-analysis findings by tightening error handling in MAC verification, removing a stray/incorrect assignment in OpenSSH key parsing, and fixing CSI cursor-position handling in the Windows terminal code path.

Changes:

  • Ensure VerifyMac() only performs the constant-time MAC comparison when HMAC computation succeeded, preserving the underlying HMAC error on failure.
  • Remove an incorrect idx = 0; assignment in GetOpenSshKey()’s private-key parsing path.
  • Fix CSI H cursor positioning to treat 0/omitted row/column arguments as 1 before applying the Linux(1,1) ↔ Windows(0,0) offset.

Reviewed changes

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

File Description
src/wolfterm.c Fixes CSI H cursor move argument defaults to avoid unsigned underflow and to align with expected terminal semantics.
src/internal.c Fixes static-analysis issues in OpenSSH key parsing and MAC verification error handling.

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

@ejohnstown ejohnstown self-requested a review May 8, 2026 17:16
@ejohnstown ejohnstown merged commit 1843f84 into wolfSSL:master May 8, 2026
135 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.

4 participants