From 9d69bd7e93a71a69c286f5edf38cbff97e4a1e85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Thu, 24 Feb 2022 02:07:55 +0000 Subject: [PATCH] src: do not ignore return value of BIO_reset The USE macro indicates that a value is intentionally ignored. Instead, CHECK that the function succeeds. --- src/crypto/crypto_common.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/crypto/crypto_common.cc b/src/crypto/crypto_common.cc index dce0774e8fa632..eb4e4f6f50047f 100644 --- a/src/crypto/crypto_common.cc +++ b/src/crypto/crypto_common.cc @@ -302,7 +302,7 @@ Local ToV8Value(Environment* env, const BIOPointer& bio) { mem->data, NewStringType::kNormal, mem->length); - USE(BIO_reset(bio.get())); + CHECK_EQ(BIO_reset(bio.get()), 1); return ret.FromMaybe(Local()); } @@ -925,7 +925,7 @@ v8::MaybeLocal GetSubjectAltNameString( CHECK_NOT_NULL(ext); if (!SafeX509SubjectAltNamePrint(bio, ext)) { - USE(BIO_reset(bio.get())); + CHECK_EQ(BIO_reset(bio.get()), 1); return v8::Null(env->isolate()); } @@ -944,7 +944,7 @@ v8::MaybeLocal GetInfoAccessString( CHECK_NOT_NULL(ext); if (!SafeX509InfoAccessPrint(bio, ext)) { - USE(BIO_reset(bio.get())); + CHECK_EQ(BIO_reset(bio.get()), 1); return v8::Null(env->isolate()); } @@ -961,7 +961,7 @@ MaybeLocal GetIssuerString( issuer_name, 0, kX509NameFlagsMultiline) <= 0) { - USE(BIO_reset(bio.get())); + CHECK_EQ(BIO_reset(bio.get()), 1); return Undefined(env->isolate()); } @@ -977,7 +977,7 @@ MaybeLocal GetSubject( X509_get_subject_name(cert), 0, kX509NameFlagsMultiline) <= 0) { - USE(BIO_reset(bio.get())); + CHECK_EQ(BIO_reset(bio.get()), 1); return Undefined(env->isolate()); }