Skip to content

Drop incorrect const from ForceZero mem argument#1106

Open
ejohnstown wants to merge 1 commit into
wolfSSL:masterfrom
ejohnstown:forcezero-non-const
Open

Drop incorrect const from ForceZero mem argument#1106
ejohnstown wants to merge 1 commit into
wolfSSL:masterfrom
ejohnstown:forcezero-non-const

Conversation

@ejohnstown

Copy link
Copy Markdown
Contributor

ForceZero writes zeros through mem, so const void* wasn't the right kind of pointer to take. It worked because of the casting later.

ForceZero writes zeros through mem, so const void* wasn't the right
kind of pointer to take. It worked because of the casting later.

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #1106

Scan targets checked: wolfssh-bugs, wolfssh-src

No new issues found in the changed files. ✅

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 corrects the ForceZero function signature to reflect that it writes to the provided memory buffer, by removing the incorrect const qualifier from the mem parameter.

Changes:

  • Update ForceZero declaration in wolfssh/misc.h from const void* to void*.
  • Update ForceZero definition in src/misc.c from const void* to void*.

Reviewed changes

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

File Description
wolfssh/misc.h Adjusts the ForceZero prototype so callers must provide a writable buffer.
src/misc.c Keeps the implementation consistent with the corrected writable-buffer signature.

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

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