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: fb3a9cd

PR-URL: #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 ce99600 commit f47a069
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 f47a069

Please sign in to comment.