From a9936cf3ee404591d1b620902f124dc2d1ef41c9 Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Mon, 28 Nov 2016 10:39:07 -0700 Subject: [PATCH] correct MEMORY_E returns in asn.c --- wolfcrypt/src/asn.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index a5b484e27..92c725737 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -4300,7 +4300,7 @@ static int DecodeAltNames(byte* input, int sz, DecodedCert* cert) DYNAMIC_TYPE_ALTNAME); if (dnsEntry == NULL) { WOLFSSL_MSG("\tOut of Memory"); - return ASN_PARSE_E; + return MEMORY_E; } dnsEntry->name = (char*)XMALLOC(strLen + 1, cert->heap, @@ -4308,7 +4308,7 @@ static int DecodeAltNames(byte* input, int sz, DecodedCert* cert) if (dnsEntry->name == NULL) { WOLFSSL_MSG("\tOut of Memory"); XFREE(dnsEntry, cert->heap, DYNAMIC_TYPE_ALTNAME); - return ASN_PARSE_E; + return MEMORY_E; } XMEMCPY(dnsEntry->name, &input[idx], strLen); @@ -4336,7 +4336,7 @@ static int DecodeAltNames(byte* input, int sz, DecodedCert* cert) DYNAMIC_TYPE_ALTNAME); if (emailEntry == NULL) { WOLFSSL_MSG("\tOut of Memory"); - return ASN_PARSE_E; + return MEMORY_E; } emailEntry->name = (char*)XMALLOC(strLen + 1, cert->heap, @@ -4344,7 +4344,7 @@ static int DecodeAltNames(byte* input, int sz, DecodedCert* cert) if (emailEntry->name == NULL) { WOLFSSL_MSG("\tOut of Memory"); XFREE(emailEntry, cert->heap, DYNAMIC_TYPE_ALTNAME); - return ASN_PARSE_E; + return MEMORY_E; } XMEMCPY(emailEntry->name, &input[idx], strLen);