careful not to thrust h_length from gethostby{name,addr}

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1056 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1996-11-19 21:56:12 +00:00
parent 42ba7456be
commit 99f492acf0
8 changed files with 26 additions and 30 deletions

View File

@@ -150,7 +150,7 @@ get_xsockets (int *unix_socket, int *tcp_socket)
h = gethostbyname ("localhost");
if (h)
memcpy (&local, h->h_addr, h->h_length);
memcpy (&local, h->h_addr, sizeof(local));
else
local.s_addr = INADDR_LOOPBACK;