Skip to content

Add oom checking in CertStore infrastructure #5819

Closed
@earlephilhower

Description

@earlephilhower

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).

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions