diff options
author | Damien Miller <djm@mindrot.org> | 2016-05-10 01:51:06 +0200 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2016-05-10 01:51:06 +0200 |
commit | 332ff3d770631e7513fea38cf0d3689f673f0e3f (patch) | |
tree | d58742672c74adfb488de071ec2af930f2ee90cc /openbsd-compat/bindresvport.c | |
parent | upstream commit (diff) | |
download | openssh-332ff3d770631e7513fea38cf0d3689f673f0e3f.tar.xz openssh-332ff3d770631e7513fea38cf0d3689f673f0e3f.zip |
initialise salen in binresvport_sa
avoids failures with UsePrivilegedPort=yes
patch from Juan Gallego
Diffstat (limited to 'openbsd-compat/bindresvport.c')
-rw-r--r-- | openbsd-compat/bindresvport.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/openbsd-compat/bindresvport.c b/openbsd-compat/bindresvport.c index c89f21403..eeb269d59 100644 --- a/openbsd-compat/bindresvport.c +++ b/openbsd-compat/bindresvport.c @@ -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 */ |