Skip to content

additional sanity checks on arguments from static analysis tests#222

Merged
lealem47 merged 3 commits intowolfSSL:mainfrom
JacobBarthelmeh:fenrir
May 1, 2026
Merged

additional sanity checks on arguments from static analysis tests#222
lealem47 merged 3 commits intowolfSSL:mainfrom
JacobBarthelmeh:fenrir

Conversation

@JacobBarthelmeh
Copy link
Copy Markdown
Contributor

No description provided.

@JacobBarthelmeh JacobBarthelmeh self-assigned this Apr 29, 2026
Copilot AI review requested due to automatic review settings April 29, 2026 22:43
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

Note

Copilot was unable to run its full agentic suite in this review.

Adds additional sanity checks and regression tests around CLI argument handling and I/O behaviors, while hardening a few code paths flagged by static analysis (NULL checks and safer pointer usage).

Changes:

  • Add regression tests for RSA -pubin/-inform DER round-trip and enc writing ciphertext to stdout when -out is omitted.
  • Add missing NULL checks around object creation/usage in verify/PKCS7/EVP crypto paths.
  • Fix RSA public-key DER parsing to avoid freeing an advanced pointer after d2i decoding.

Reviewed changes

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

Show a summary per file
File Description
tests/pkey/rsa-test.py Adds test coverage for RSA public key DER output + modulus printing.
tests/encrypt/enc-test.py Adds test ensuring enc emits ciphertext to stdout when no -out is specified.
src/sign-verify/clu_x509_verify.c Guards intermediate stack push behind successful stack creation.
src/sign-verify/clu_crl_verify.c Adds NULL check after wolfSSL_CertManagerNew() before using it.
src/pkey/clu_rsa.c Uses a separate parse pointer for d2i to keep the base pointer valid for XFREE.
src/pkcs/clu_pkcs7.c Checks for NULL return from wolfSSL_BIO_new() before calling wolfSSL_BIO_set_fp().
src/crypto/clu_evp_crypto.c Avoids calling wolfSSL_BIO_set_fp() when BIO allocation fails.

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

Comment thread src/crypto/clu_evp_crypto.c Outdated
Comment thread src/pkcs/clu_pkcs7.c
Comment thread src/pkey/clu_rsa.c Outdated
Comment thread tests/encrypt/enc-test.py Outdated
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

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.


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

Comment thread src/tools/clu_funcs.c
Copy link
Copy Markdown

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

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #222

Scan targets checked: wolfclu-bugs, wolfclu-src

No new issues found in the changed files. ✅

@lealem47 lealem47 merged commit 7f1b177 into wolfSSL:main May 1, 2026
27 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.

5 participants