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

signature: don't leave a dangling pointer to the strings on parse failure #4306

Merged
merged 1 commit into from Jul 14, 2017

Conversation

carlosmn
Copy link
Member

If the signature is invalid but we detect that after allocating the strings, we
free them. We however leave that pointer dangling in the structure the caller
gave us, which can lead to double-free.

Set these pointers to NULL after freeing their memory to avoid this.

…lure

If the signature is invalid but we detect that after allocating the strings, we
free them. We however leave that pointer dangling in the structure the caller
gave us, which can lead to double-free.

Set these pointers to `NULL` after freeing their memory to avoid this.
@pks-t pks-t merged commit 8149f85 into master Jul 14, 2017
@pks-t
Copy link
Member

pks-t commented Jul 14, 2017

Looks obviously correct! Test failures were (yet again) unrelated. 👍

@pks-t pks-t added the backport label Jan 11, 2018
@pks-t pks-t mentioned this pull request Jan 12, 2018
@ethomson ethomson deleted the cmn/tag-bad-signature branch January 9, 2019 10:20
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

2 participants