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

Coverity issues #3082

Merged
merged 1 commit into from
Mar 21, 2024
Merged

Coverity issues #3082

merged 1 commit into from
Mar 21, 2024

Conversation

xhanulik
Copy link
Contributor

Fix for recently found CID 424593, 424594.

Checklist
  • Documentation is added or updated
  • New files have a LGPL 2.1 license statement
  • PKCS#11 module is tested

Copy link
Member

@Jakuje Jakuje left a comment

Choose a reason for hiding this comment

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

nit: In the ways out: the check for non-NULL ctx are not needed

And once we touch it, we should probably check the return value of EVP_CIPHER_CTX_set_padding too.

@xhanulik
Copy link
Contributor Author

And once we touch it, we should probably check the return value of EVP_CIPHER_CTX_set_padding too.

From documentation, EVP_CIPHER_CTX_set_padding() always returns 1. But I will remove the unneeded ifs.

@Jakuje
Copy link
Member

Jakuje commented Mar 21, 2024

From documentation, EVP_CIPHER_CTX_set_padding() always returns 1. But I will remove the unneeded ifs.

Good point. But it might change so sanity-checking the return value should not hurt.

@xhanulik xhanulik force-pushed the coverity branch 2 times, most recently from e34a10a to 7a5568e Compare March 21, 2024 12:23
Thanks Coverity
CID 424593, 424594
@xhanulik
Copy link
Contributor Author

Thanks for review, merging.

@xhanulik xhanulik merged commit 993e646 into OpenSC:master Mar 21, 2024
44 checks passed
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.

None yet

3 participants