(hookup): terminate string from gethostbyname
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1618 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -76,6 +76,7 @@ hookup(char *host, int port)
|
||||
hp->h_addr_list[0],
|
||||
sizeof(hisctladdr.sin_addr));
|
||||
strncpy(hostnamebuf, hp->h_name, sizeof(hostnamebuf));
|
||||
hostnamebuf[sizeof(hostnamebuf) - 1] = '\0';
|
||||
}
|
||||
hostname = hostnamebuf;
|
||||
s = socket(hisctladdr.sin_family, SOCK_STREAM, 0);
|
||||
|
Reference in New Issue
Block a user