Test for non-NULL 'ai_canonname', as per MSDN recommendation.
This commit is contained in:
parent
a64a4b5dbc
commit
54c766e110
@ -245,7 +245,7 @@ const vmime::string windowsHandler::getHostName() const
|
||||
{
|
||||
for (struct addrinfo* p = info ; p != NULL ; p = p->ai_next)
|
||||
{
|
||||
if (isFQDN(p->ai_canonname))
|
||||
if (p->ai_canonname && isFQDN(p->ai_canonname))
|
||||
{
|
||||
const string ret(p->ai_canonname);
|
||||
freeaddrinfo(info);
|
||||
|
Loading…
Reference in New Issue
Block a user