Skip to content

fix: unchecked *_set_* calls - #1044

Merged
rhenium merged 2 commits into
ruby:masterfrom
ndossche:clesss-15
Nov 10, 2026
Merged

rhenium merged 2 commits into
ruby:masterfrom
ndossche:clesss-15

Conversation

@ndossche

Copy link
Copy Markdown
Contributor

Fixes #1038

This was found by a hybrid static-dynamic analyser that looks for inconsistent handling of error checks in bindings.

@ndossche
ndossche force-pushed the clesss-15 branch 2 times, most recently from 7144836 to 82c47b5 Compare May 4, 2026 21:13
Comment thread ext/openssl/ossl_ts.c Outdated
if (!TS_RESP_CTX_set_certs(ctx, inter_certs)) {
err_msg = "Certificates could not be set";
goto end;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created #1148 to refactor this method, since there are a few more issues that need to be fixed here.

@rhenium

rhenium commented Nov 10, 2026

Copy link
Copy Markdown
Member

I rebased the branch onto current master to resolve merge conflicts, dropped the change for OpenSSL::Timestamp::Factory#create_timestamp which is now covered in #1148, and added a new commit to fix for similar unchecked calls that I could find.

@rhenium
rhenium merged commit a017aae into ruby:master Nov 10, 2026
48 checks passed
@rhenium

rhenium commented Nov 10, 2026

Copy link
Copy Markdown
Member

Merged it, thanks for spotting and fixing!

@ndossche

Copy link
Copy Markdown
Contributor Author

Thanks for taking this over and finalizing this ! 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unchecked *_set_* calls

2 participants