Skip to content

Commit

Permalink
crypto: check result of BIO_new in X509ToObject
Browse files Browse the repository at this point in the history
Match other call sites of BIO_new(BIO_s_mem()) and CHECK the result of
the call.

Refs: nodejs@fb3a9cd

PR-URL: nodejs#41979
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
  • Loading branch information
tniessen authored and bengl committed Feb 21, 2022
1 parent 8c7f1df commit 6522c32
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/crypto/crypto_common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1351,6 +1351,7 @@ MaybeLocal<Object> X509ToObject(
Local<Object> info = Object::New(env->isolate());

BIOPointer bio(BIO_new(BIO_s_mem()));
CHECK(bio);

if (names_as_string) {
// TODO(tniessen): this branch should not have to exist. It is only here
Expand Down

0 comments on commit 6522c32

Please sign in to comment.