Switch strncpy to memcpy in the altname store function.

pull/2728/head
John Safranek 2020-01-10 16:17:27 -08:00
parent 8d1b20706c
commit c69bd5169f
No known key found for this signature in database
GPG Key ID: 8CE817DE0D3CCB4A
1 changed files with 1 additions and 1 deletions

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;