summaryrefslogtreecommitdiff
path: root/openbsd-compat
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2016-05-10 09:51:06 +1000
committerDamien Miller <djm@mindrot.org>2016-05-10 09:51:06 +1000
commit332ff3d770631e7513fea38cf0d3689f673f0e3f (patch)
treed58742672c74adfb488de071ec2af930f2ee90cc /openbsd-compat
parentc5c1d5d2f04ce00d2ddd6647e61b32f28be39804 (diff)
initialise salen in binresvport_sa
avoids failures with UsePrivilegedPort=yes patch from Juan Gallego
Diffstat (limited to 'openbsd-compat')
-rw-r--r--openbsd-compat/bindresvport.c1
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)
64 if (sa == NULL) { 64 if (sa == NULL) {
65 memset(&myaddr, 0, sizeof(myaddr)); 65 memset(&myaddr, 0, sizeof(myaddr));
66 sa = (struct sockaddr *)&myaddr; 66 sa = (struct sockaddr *)&myaddr;
67 salen = sizeof(myaddr);
67 68
68 if (getsockname(sd, sa, &salen) == -1) 69 if (getsockname(sd, sa, &salen) == -1)
69 return -1; /* errno is correctly set */ 70 return -1; /* errno is correctly set */