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

x509_vfy: remove redundant stack allocation #14161

Closed
wants to merge 1 commit into from

Conversation

kaduk
Copy link
Contributor

@kaduk kaduk commented Feb 12, 2021

Fix CID 1472833 by removing a codepath that attempts to allocate a
stack if not already allocated, when the stack was already allocated
unconditionally a few lines previously.

@kaduk kaduk added branch: master Merge to master branch approval: otc review pending This pull request needs review by an OTC member labels Feb 12, 2021
Fix CID 1472833 by removing a codepath that attempts to allocate a
stack if not already allocated, when the stack was already allocated
unconditionally a few lines previously.

Interestingly enough, this additional allocation path (and the comment
describing the need for it) were added in commit
69664d6, also prompted by Coverity(!).
It seems that the intervening (and much more recent) commit
d53b437 that allowed sk_X509_dup()
to accept a NULL argument allowed the earlier initialization path
to unconditionally allocate a stack, rendering this later allocation fully
redundant.
@slontis
Copy link
Member

slontis commented Feb 12, 2021

I know it is painful, but could you also update the triage fields in coverity please..

@kaduk
Copy link
Contributor Author

kaduk commented Feb 12, 2021

Update (force) pushed; hopefully the re-review burden is not too big.

I know it is painful, but could you also update the triage fields in coverity please..

Gosh, I will have to remember where my account credentials live. I think I actually have one, though I'm not even 100% sure of that...

@slontis
Copy link
Member

slontis commented Feb 12, 2021

How did you view the issues? You can sign in with github credentials.

@kaduk
Copy link
Contributor Author

kaduk commented Feb 12, 2021

How did you view the issues? You can sign in with github credentials.

There's an email summary that gets sent periodically to ... oh hey, the email address on my github account. I must have enabled email notification for something, somewhere.

@slontis slontis added approval: done This pull request has the required number of approvals and removed approval: otc review pending This pull request needs review by an OTC member labels Feb 12, 2021
@openssl-machine openssl-machine removed the approval: done This pull request has the required number of approvals label Feb 13, 2021
@openssl-machine
Copy link
Collaborator

This pull request is ready to merge

@openssl-machine openssl-machine added the approval: ready to merge The 24 hour grace period has passed, ready to merge label Feb 13, 2021
openssl-machine pushed a commit that referenced this pull request Feb 15, 2021
Fix CID 1472833 by removing a codepath that attempts to allocate a
stack if not already allocated, when the stack was already allocated
unconditionally a few lines previously.

Interestingly enough, this additional allocation path (and the comment
describing the need for it) were added in commit
69664d6, also prompted by Coverity(!).
It seems that the intervening (and much more recent) commit
d53b437 that allowed sk_X509_dup()
to accept a NULL argument allowed the earlier initialization path
to unconditionally allocate a stack, rendering this later allocation fully
redundant.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from #14161)
@slontis
Copy link
Member

slontis commented Feb 15, 2021

Thanks for fixing. Merged to master.

@slontis slontis closed this Feb 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approval: ready to merge The 24 hour grace period has passed, ready to merge branch: master Merge to master branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants