From c1e297c6204187a515bdf3f745255b0377277686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Tue, 15 Feb 2022 00:34:56 +0000 Subject: [PATCH] crypto: check result of BIO_new in X509ToObject Match other call sites of BIO_new(BIO_s_mem()) and CHECK the result of the call. Refs: https://github.com/nodejs/node/commit/fb3a9cd0d8e8cf5f3120012a28643230b31c1f83 --- src/crypto/crypto_common.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/crypto/crypto_common.cc b/src/crypto/crypto_common.cc index b7f0dbcf8b676a..09358ce2df03a3 100644 --- a/src/crypto/crypto_common.cc +++ b/src/crypto/crypto_common.cc @@ -1299,6 +1299,7 @@ MaybeLocal X509ToObject( Local 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