mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-28 16:24:39 +02: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…
x
Reference in New Issue
Block a user