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

PR-URL: https://github.com/nodejs/node/pull/41979
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
Tobias Nießen authored and GitHub committed 2022-02-17 23:11:54 +00:00
1 parent 19370b3176
commit bd0474974a
1 file changed
+1
+1
View File
@@ -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