Skip to content

Conversation

@olszomal
Copy link
Collaborator

Avoid undefined behavior with BIO_get_fp() by replacing BIO_new_file() with fopen() + BIO_new_fp()

@mtrojnar
Copy link
Owner

Thank you. Our osslsigncode seems a bit inconsistent about using BIO_new_file() vs fopen()/BIO_new_fp(). I think it would be useful to only use fopen()/BIO_new_fp(), preferably wrapping them in a new function in helpers.c. This way, we would never need to guess whether it's safe to use BIO_get_fp() for a BIO or not. What do you think?

@mtrojnar mtrojnar merged commit d792e8d into mtrojnar:master Sep 19, 2025
10 checks passed
@olszomal olszomal deleted the bio_fp branch September 22, 2025 07:17
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.

2 participants