add +1 for string null terminator

pull/2854/head
Jacob Barthelmeh 2020-03-18 10:25:56 -06:00
parent eb6f44e491
commit 2bf39307f1
1 changed files with 1 additions and 1 deletions

View File

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