Merge pull request #2854 from JacobBarthelmeh/Certs

add +1 for string null terminator
This commit is contained in:
toddouska
2020-03-19 16:24:42 -07:00
committed by GitHub

View File

@@ -7941,7 +7941,7 @@ static int DecodeAltNames(const byte* input, int sz, DecodedCert* cert)
} }
ipAddr->type = ASN_IP_TYPE; ipAddr->type = ASN_IP_TYPE;
ipAddr->name = (char*)XMALLOC(strLen, cert->heap, ipAddr->name = (char*)XMALLOC(strLen + 1, cert->heap,
DYNAMIC_TYPE_ALTNAME); DYNAMIC_TYPE_ALTNAME);
if (ipAddr->name == NULL) { if (ipAddr->name == NULL) {
WOLFSSL_MSG("\tOut of Memory"); WOLFSSL_MSG("\tOut of Memory");