Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: do not ignore return value of BIO_reset #42103

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/crypto/crypto_common.cc
Expand Up @@ -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>());
}

Expand Down Expand Up @@ -925,7 +925,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());
}

Expand All @@ -944,7 +944,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());
}

Expand All @@ -961,7 +961,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());
}

Expand All @@ -977,7 +977,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());
}

Expand Down