Remember to zero sockaddr_in struct before calling uaddr_to_sockaddr() to

populate it. Not doing this can result in a garbage sockaddr_in, which
will cause connect() to block inside clnttcp_create().
This commit is contained in:
Bill Paul 1997-06-15 21:03:32 +00:00
parent f2305d469b
commit c88fdb1d1d
1 changed files with 1 additions and 0 deletions

View File

@ -323,6 +323,7 @@ __rpc_get_time_offset(td, srv, thost, uaddr, netid)
sprintf(ipuaddr, "%d.%d.%d.%d.0.111", a1, a2, a3, a4);
useua = &ipuaddr[0];
bzero((char *)&sin, sizeof(sin));
if (uaddr_to_sockaddr(useua, &sin)) {
msg("unable to translate uaddr to sockaddr.");
if (needfree)