(guess_domain): handle ai_canonname not being set
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7610 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -91,7 +91,8 @@ guess_domain (char *hostname, size_t sz)
|
||||
if (error)
|
||||
return hostname;
|
||||
|
||||
strlcpy (hostname, ai->ai_canonname, sz);
|
||||
if (ai->ai_canonname != NULL)
|
||||
strlcpy (hostname, ai->ai_canonname, sz);
|
||||
freeaddrinfo (ai);
|
||||
dot = strchr (hostname, '.');
|
||||
if (dot != NULL)
|
||||
|
Reference in New Issue
Block a user