mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-11-27 23:53:26 +08:00
initialise salen in binresvport_sa
avoids failures with UsePrivilegedPort=yes patch from Juan Gallego
This commit is contained in:
parent
c5c1d5d2f0
commit
332ff3d770
@ -64,6 +64,7 @@ bindresvport_sa(int sd, struct sockaddr *sa)
|
||||
if (sa == NULL) {
|
||||
memset(&myaddr, 0, sizeof(myaddr));
|
||||
sa = (struct sockaddr *)&myaddr;
|
||||
salen = sizeof(myaddr);
|
||||
|
||||
if (getsockname(sd, sa, &salen) == -1)
|
||||
return -1; /* errno is correctly set */
|
||||
|
Loading…
Reference in New Issue
Block a user