Fixed invalid buffer access.

This commit is contained in:
Vincent Richard 2013-04-26 20:48:40 +02:00
parent 28c386f54e
commit d6805634d9

View File

@ -348,7 +348,7 @@ bool X509Certificate_OpenSSL::verifyHostName(const string& hostname) const
{
// First, check subject common name against hostname
char CNBuffer[1024];
CNBuffer[sizeof(CNBuffer - 1)] = '\0';
CNBuffer[sizeof(CNBuffer) - 1] = '\0';
X509_NAME* xname = X509_get_subject_name(m_data->cert);