Skip to content

Add oom checking in CertStore infrastructure #5819

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
earlephilhower opened this issue Feb 25, 2019 · 0 comments
Closed

Add oom checking in CertStore infrastructure #5819

earlephilhower opened this issue Feb 25, 2019 · 0 comments
Assignees
Milestone

Comments

@earlephilhower
Copy link
Collaborator

CertStore attempts to use new X509Cert() but doesn't verify that it's non-NULL.

cs->_x509 = new X509List(der, ci.length);
free(der);
br_x509_trust_anchor *ta = (br_x509_trust_anchor*)cs->_x509->getTrustAnchors();
memcpy(ta->dn.data, ci.sha256, sizeof(ci.sha256));
ta->dn.len = sizeof(ci.sha256);

Add a check and gracefully fail if possible in normal mode (with a debug dump in debug mode).

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

No branches or pull requests

1 participant