(hookup): handle ai_canonname not being set
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7609 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -76,7 +76,10 @@ hookup (const char *host, int port)
|
||||
code = -1;
|
||||
return NULL;
|
||||
}
|
||||
strlcpy (hostnamebuf, ai->ai_canonname, sizeof(hostnamebuf));
|
||||
if (ai->ai_canonname != NULL)
|
||||
strlcpy (hostnamebuf, ai->ai_canonname, sizeof(hostnamebuf));
|
||||
else
|
||||
strlcpy (hostnamebuf, host, sizeof(hostnamebuf));
|
||||
hostname = hostnamebuf;
|
||||
|
||||
for (a = ai; a != NULL; a = a->ai_next) {
|
||||
|
Reference in New Issue
Block a user