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

x509asn1: avoid freeing unallocated pointers #10087

Closed

Conversation

danielgustafsson
Copy link
Member

When utf8asn1str fails there is no allocation returned, so freeing the return pointer in **to is at best a no-op and at worst a double- free bug waiting to happen. The current coding isn't hiding any such bugs but to future proof, avoid freeing the return value pointer iff the function failed.

When utf8asn1str fails there is no allocation returned, so freeing
the return pointer in **to is at best a no-op and at worst a double-
free bug waiting to happen. The current coding isn't hiding any such
bugs but to future proof, avoid freeing the return value pointer iff
the function failed.

Closes: #xxxx
@bagder bagder added the tidy-up label Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

2 participants