Fixed issue with not properly returning memory error in CopyDecodedToX509 after DER refactor.

This commit is contained in:
David Garske
2016-02-24 07:04:03 +01:00
parent 3fe5ee1a7c
commit 1227db4e44

View File

@@ -4469,7 +4469,8 @@ int CopyDecodedToX509(WOLFSSL_X509* x509, DecodedCert* dCert)
}
/* 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);
}