Switch strncpy to memcpy in the altname store function.

This commit is contained in:
John Safranek
2020-01-10 16:17:27 -08:00
parent 8d1b20706c
commit c69bd5169f

View File

@ -9771,7 +9771,7 @@ int wolfSSL_X509_add_altname(WOLFSSL_X509* x509, const char* name, int type)
return WOLFSSL_FAILURE;
}
XSTRNCPY(nameCopy, name, nameSz);
XMEMCPY(nameCopy, name, nameSz + 1);
newAltName->next = x509->altNames;
newAltName->type = type;