Build fixes to address Jenkins reports. Additionally tested with enable-distro and small-stack identified issue in ssl.c (note: we need to add this combination to Jenkins).

This commit is contained in:
David Garske
2017-04-25 11:10:36 -07:00
parent dd2915f4fa
commit be6b12a350
3 changed files with 9 additions and 5 deletions

View File

@@ -2278,7 +2278,7 @@ static int SetKeys(Ciphers* enc, Ciphers* dec, Keys* keys, CipherSpecs* specs,
enc->des3 = (Des3*)XMALLOC(sizeof(Des3), heap, DYNAMIC_TYPE_CIPHER);
if (enc->des3 == NULL)
return MEMORY_E;
XMEMSET(enc->des3, 0, sizeof(Aes));
XMEMSET(enc->des3, 0, sizeof(Des3));
}
if (dec) {
if (dec->des3 == NULL)

View File

@@ -742,11 +742,15 @@ WOLFSSL_OCSP_BASICRESP* wolfSSL_OCSP_response_get1_basic(OcspResponse* response)
DYNAMIC_TYPE_TMP_BUFFER);
bs->source = (byte*)XMALLOC(bs->maxIdx, NULL, DYNAMIC_TYPE_TMP_BUFFER);
if (bs->status == NULL || bs->source == NULL) {
if (bs->status) XFREE(bs->status, NULL, DYNAMIC_TYPE_TMP_BUFFER);
if (bs->source) XFREE(bs->source, NULL, DYNAMIC_TYPE_TMP_BUFFER);
wolfSSL_OCSP_RESPONSE_free(bs);
bs = NULL;
}
XMEMCPY(bs->status, response->status, sizeof(CertStatus));
XMEMCPY(bs->source, response->source, response->maxIdx);
else {
XMEMCPY(bs->status, response->status, sizeof(CertStatus));
XMEMCPY(bs->source, response->source, response->maxIdx);
}
return bs;
}
@@ -765,7 +769,7 @@ OcspRequest* wolfSSL_OCSP_REQUEST_new(void)
void wolfSSL_OCSP_REQUEST_free(OcspRequest* request)
{
FreeOcspRequest(request);
XFREE(request, 0, DYNAMIC_TYPE_OPENSSL);
XFREE(request, NULL, DYNAMIC_TYPE_OPENSSL);
}
int wolfSSL_i2d_OCSP_REQUEST(OcspRequest* request, unsigned char** data)

View File

@@ -23996,7 +23996,7 @@ int wolfSSL_X509_STORE_CTX_get1_issuer(WOLFSSL_X509 **issuer,
cert = (DecodedCert*)XMALLOC(sizeof(DecodedCert), NULL,
DYNAMIC_TYPE_TMP_BUFFER);
if (cert == NULL)
return NULL;
return SSL_FAILURE;
#endif
/* Use existing CA retrieval APIs that use DecodedCert. */