diff options
author | Tobias Nießen <tniessen@tnie.de> | 2022-02-27 17:05:42 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-27 17:05:42 +0300 |
commit | 1ce42ec18ba48b9b34400b5f19fe1fea3ea8cd56 (patch) | |
tree | 640491b625807fa2d533ce7a56cf05a11a1329ac /src | |
parent | f71fca769ef7a1f022eb6ff74d875b30895aa55a (diff) |
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.
PR-URL: https://github.com/nodejs/node/pull/42103
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/crypto/crypto_common.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/crypto/crypto_common.cc b/src/crypto/crypto_common.cc index 1e3060517a3..8230f3043fa 100644 --- a/src/crypto/crypto_common.cc +++ b/src/crypto/crypto_common.cc @@ -302,7 +302,7 @@ Local<Value> 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<Value>()); } @@ -919,7 +919,7 @@ v8::MaybeLocal<v8::Value> 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()); } @@ -938,7 +938,7 @@ v8::MaybeLocal<v8::Value> 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()); } @@ -955,7 +955,7 @@ MaybeLocal<Value> GetIssuerString( issuer_name, 0, kX509NameFlagsMultiline) <= 0) { - USE(BIO_reset(bio.get())); + CHECK_EQ(BIO_reset(bio.get()), 1); return Undefined(env->isolate()); } @@ -971,7 +971,7 @@ MaybeLocal<Value> 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()); } |