aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2013-08-18 16:11:57 +0000
committerVincent Richard <[email protected]>2013-08-18 16:11:57 +0000
commit54c766e1103c7f894bdc22e5ae2df572e834d289 (patch)
tree5ebb9112efdc1457da16df93336750453ef624dc
parentOpen the file in shared mode not to lock file. (diff)
downloadvmime-54c766e1103c7f894bdc22e5ae2df572e834d289.tar.gz
vmime-54c766e1103c7f894bdc22e5ae2df572e834d289.zip
Test for non-NULL 'ai_canonname', as per MSDN recommendation.
-rw-r--r--src/platforms/windows/windowsHandler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/platforms/windows/windowsHandler.cpp b/src/platforms/windows/windowsHandler.cpp
index ae4069de..d4027801 100644
--- a/src/platforms/windows/windowsHandler.cpp
+++ b/src/platforms/windows/windowsHandler.cpp
@@ -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);