Skip to content

Add missing error check on PEM_write_bio_CMS() #10752

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

Closed
wants to merge 2 commits into from

Conversation

nielsdos
Copy link
Member

@nielsdos nielsdos commented Mar 2, 2023

On failure, this function returns 0. 2 other callers of this function already check the return value, but this one was missed.

Found using an experimental static analyser I'm working on.

Copy link
Member

@iluuu1994 iluuu1994 left a comment

Choose a reason for hiding this comment

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

LGTM, but please confirm Jakub 🙂

Copy link
Member

@bukka bukka left a comment

Choose a reason for hiding this comment

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

Looks good. Btw the same issue is probably with PEM_write_bio_PKCS7...

nielsdos added 2 commits March 4, 2023 20:09
On failure, this function returns 0. 2 other callers of this function
already check the return value, but this one was missed.
@nielsdos
Copy link
Member Author

nielsdos commented Mar 4, 2023

Updated, thanks :)

Copy link
Member

@bukka bukka left a comment

Choose a reason for hiding this comment

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

Looks good now. Preferably keep it as 2 commits when merging...

@nielsdos nielsdos self-assigned this Mar 5, 2023
@nielsdos nielsdos closed this in 22c9e7e Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants