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 Feb 17, 2022
1 parent 19370b3 commit bd04749
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 @@ -1303,6 +1303,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 bd04749

Please sign in to comment.