mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 12:14:38 +02:00
Merge pull request #772 from toddouska/sr3-fix
fix signer memory takeover on malformed data
This commit is contained in:
12
src/ssl.c
12
src/ssl.c
@@ -3354,10 +3354,14 @@ int AddCA(WOLFSSL_CERT_MANAGER* cm, DerBuffer** pDer, int type, int verify)
|
|||||||
ret = MEMORY_ERROR;
|
ret = MEMORY_ERROR;
|
||||||
else {
|
else {
|
||||||
signer->keyOID = cert->keyOID;
|
signer->keyOID = cert->keyOID;
|
||||||
signer->publicKey = cert->publicKey;
|
if (cert->pubKeyStored) {
|
||||||
signer->pubKeySize = cert->pubKeySize;
|
signer->publicKey = cert->publicKey;
|
||||||
signer->nameLen = cert->subjectCNLen;
|
signer->pubKeySize = cert->pubKeySize;
|
||||||
signer->name = cert->subjectCN;
|
}
|
||||||
|
if (cert->subjectCNStored) {
|
||||||
|
signer->nameLen = cert->subjectCNLen;
|
||||||
|
signer->name = cert->subjectCN;
|
||||||
|
}
|
||||||
signer->pathLength = cert->pathLength;
|
signer->pathLength = cert->pathLength;
|
||||||
signer->pathLengthSet = cert->pathLengthSet;
|
signer->pathLengthSet = cert->pathLengthSet;
|
||||||
#ifndef IGNORE_NAME_CONSTRAINTS
|
#ifndef IGNORE_NAME_CONSTRAINTS
|
||||||
|
Reference in New Issue
Block a user