mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 04:04:39 +02:00
Fixed issue with not properly returning memory error in CopyDecodedToX509 after DER refactor.
This commit is contained in:
@@ -4469,7 +4469,8 @@ int CopyDecodedToX509(WOLFSSL_X509* x509, DecodedCert* dCert)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* store cert for potential retrieval */
|
/* store cert for potential retrieval */
|
||||||
if (AllocDer(&x509->derCert, dCert->maxIdx, CERT_TYPE, NULL) == 0) {
|
ret = AllocDer(&x509->derCert, dCert->maxIdx, CERT_TYPE, NULL);
|
||||||
|
if (ret == 0) {
|
||||||
XMEMCPY(x509->derCert.buffer, dCert->source, dCert->maxIdx);
|
XMEMCPY(x509->derCert.buffer, dCert->source, dCert->maxIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user