Skip to content

crypto: add null checks for OPENSSL_INIT_new() - #63457

Open
ndossche wants to merge 1 commit into
nodejs:mainfrom
ndossche:clesss-7
Open

crypto: add null checks for OPENSSL_INIT_new()#63457
ndossche wants to merge 1 commit into
nodejs:mainfrom
ndossche:clesss-7

Conversation

@ndossche

Copy link
Copy Markdown
Contributor

Other calls in initialization code often already check for null pointers via CHECK_NOT_NULL(). Do the same here.

This was found with the help of a static-dynamic analyzer I'm working on.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/crypto
  • @nodejs/startup

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. crypto Issues and PRs related to the crypto subsystem. needs-ci PRs that need a full CI run. labels May 20, 2026
@codecov

codecov Bot commented May 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.13%. Comparing base (cc57cb7) to head (7631255).
⚠️ Report is 39 commits behind head on main.

Files with missing lines Patch % Lines
src/crypto/crypto_util.cc 0.00% 0 Missing and 1 partial ⚠️
src/node.cc 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #63457   +/-   ##
=======================================
  Coverage   90.12%   90.13%           
=======================================
  Files         751      751           
  Lines      252536   252538    +2     
  Branches    47519    47524    +5     
=======================================
+ Hits       227598   227618   +20     
+ Misses      16250    16243    -7     
+ Partials     8688     8677   -11     
Files with missing lines Coverage Δ
src/crypto/crypto_util.cc 71.80% <0.00%> (-0.35%) ⬇️
src/node.cc 76.55% <0.00%> (-0.10%) ⬇️

... and 38 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been marked as stale due to 90 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.

@github-actions github-actions Bot added the stale label Aug 19, 2026
@tniessen tniessen removed the stale label Aug 19, 2026
Other calls in initialization code often already check for null pointers
via CHECK_NOT_NULL(). Do the same here.

Signed-off-by: ndossche <7771979+ndossche@users.noreply.github.com>
@trivikr

trivikr commented Aug 22, 2026

Copy link
Copy Markdown
Member

Rebased to re-run CI, as retry option was not available on old failed CI run.

@jasnell Can you please re-approve?

@trivikr trivikr added request-ci Add this label to start a Jenkins CI on a PR. author ready PRs that have at least one approval, no outstanding review comments, and a CI started. labels Aug 23, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 23, 2026
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. crypto Issues and PRs related to the crypto subsystem. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants