mirror of https://github.com/wolfSSL/wolfssl.git
fix signer memory takeover on malformed data
parent
b86dfd582f
commit
2d612da9f4
|
@ -3354,10 +3354,14 @@ int AddCA(WOLFSSL_CERT_MANAGER* cm, DerBuffer** pDer, int type, int verify)
|
|||
ret = MEMORY_ERROR;
|
||||
else {
|
||||
signer->keyOID = cert->keyOID;
|
||||
if (cert->pubKeyStored) {
|
||||
signer->publicKey = cert->publicKey;
|
||||
signer->pubKeySize = cert->pubKeySize;
|
||||
}
|
||||
if (cert->subjectCNStored) {
|
||||
signer->nameLen = cert->subjectCNLen;
|
||||
signer->name = cert->subjectCN;
|
||||
}
|
||||
signer->pathLength = cert->pathLength;
|
||||
signer->pathLengthSet = cert->pathLengthSet;
|
||||
#ifndef IGNORE_NAME_CONSTRAINTS
|
||||
|
|
Loading…
Reference in New Issue