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 <anna@addaleax.net>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
tniessen authored and bengl committed Feb 21, 2022
1 parent cf1fa85 commit 82c0a62
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/crypto/crypto_common.cc
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 82c0a62

Please sign in to comment.