From 2bf39307f118bf5444603ac201f6cf927d3899d8 Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Wed, 18 Mar 2020 10:25:56 -0600 Subject: [PATCH] add +1 for string null terminator --- wolfcrypt/src/asn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index 58a726fe3..f106d1cab 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -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");