mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 14:48:57 +00:00
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:
parent
f2305d469b
commit
c88fdb1d1d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=26666
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user