Skip to content

Commit bd04749

Browse files
authored
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: fb3a9cd PR-URL: #41979 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 19370b3 commit bd04749

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/crypto/crypto_common.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,6 +1303,7 @@ MaybeLocal<Object> X509ToObject(
13031303
Local<Object> info = Object::New(env->isolate());
13041304

13051305
BIOPointer bio(BIO_new(BIO_s_mem()));
1306+
CHECK(bio);
13061307

13071308
if (names_as_string) {
13081309
// TODO(tniessen): this branch should not have to exist. It is only here

0 commit comments

Comments
 (0)