Skip to content

Commit

Permalink
src: add nullptr handling from X509_STORE_new()
Browse files Browse the repository at this point in the history
In openssl we should check result of X509_STORE_new() for nullptr
Refs: #56694

PR-URL: #56700
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
wooffie authored and aduh95 committed Jan 30, 2025
1 parent 8fb03d8 commit 575251a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/crypto/crypto_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ X509_STORE* NewRootCertStore() {
}

X509_STORE* store = X509_STORE_new();
CHECK_NOT_NULL(store);
if (*system_cert_path != '\0') {
ERR_set_mark();
X509_STORE_load_locations(store, system_cert_path, nullptr);
Expand Down

0 comments on commit 575251a

Please sign in to comment.