diff options
author | wpaul <wpaul@FreeBSD.org> | 1997-06-15 21:03:32 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1997-06-15 21:03:32 +0000 |
commit | 3c54eb0587d99c6434081b4d6d36824c70d2a358 (patch) | |
tree | 91e966fb2294549722ef9755116697fe6d94271e /lib/libc/rpc/auth_time.c | |
parent | 898607164bdf15e11a347b104c06a10f000200dd (diff) | |
download | FreeBSD-src-3c54eb0587d99c6434081b4d6d36824c70d2a358.zip FreeBSD-src-3c54eb0587d99c6434081b4d6d36824c70d2a358.tar.gz |
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().
Diffstat (limited to 'lib/libc/rpc/auth_time.c')
-rw-r--r-- | lib/libc/rpc/auth_time.c | 1 |
1 files changed, 1 insertions, 0 deletions
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) |