From c88fdb1d1d33abb9c45e08ea55986b95ab384ea1 Mon Sep 17 00:00:00 2001 From: Bill Paul Date: Sun, 15 Jun 1997 21:03:32 +0000 Subject: [PATCH] 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(). --- lib/libc/rpc/auth_time.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libc/rpc/auth_time.c b/lib/libc/rpc/auth_time.c index 2b9a5a929e4..3128e6d4c4f 100644 --- a/lib/libc/rpc/auth_time.c +++ b/lib/libc/rpc/auth_time.c @@ -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)