Skip to content

Commit 89ba3af

Browse files
wooffieaduh95
authored andcommittedFeb 6, 2025
src: add nullptr handling from X509_STORE_new()
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>
1 parent 1a79e87 commit 89ba3af

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎src/crypto/crypto_context.cc

+1
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ X509_STORE* NewRootCertStore() {
272272
}
273273

274274
X509_STORE* store = X509_STORE_new();
275+
CHECK_NOT_NULL(store);
275276
if (*system_cert_path != '\0') {
276277
ERR_set_mark();
277278
X509_STORE_load_locations(store, system_cert_path, nullptr);

0 commit comments

Comments
 (0)
Please sign in to comment.