From 3c54eb0587d99c6434081b4d6d36824c70d2a358 Mon Sep 17 00:00:00 2001 From: wpaul Date: Sun, 15 Jun 1997 21:03:32 +0000 Subject: 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(+) (limited to 'lib/libc/rpc/auth_time.c') diff --git a/lib/libc/rpc/auth_time.c b/lib/libc/rpc/auth_time.c index 2b9a5a9..3128e6d 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) -- cgit v1.1