paranoia with result from `gethostbyname'
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1619 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -106,7 +106,7 @@ main(int argc, char **argv)
|
|||||||
memset(&sa, 0, sizeof(sa));
|
memset(&sa, 0, sizeof(sa));
|
||||||
sa.sin_family = AF_INET;
|
sa.sin_family = AF_INET;
|
||||||
sa.sin_port = port;
|
sa.sin_port = port;
|
||||||
memcpy(&sa.sin_addr, hp->h_addr, hp->h_length);
|
memcpy(&sa.sin_addr, hp->h_addr, sizeof(sa.sin_addr));
|
||||||
if(connect(s, (struct sockaddr*)&sa, sizeof(sa)) < 0)
|
if(connect(s, (struct sockaddr*)&sa, sizeof(sa)) < 0)
|
||||||
err(1, "connect");
|
err(1, "connect");
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user