[openssh-commits] [openssh] 01/01: initialise salen in binresvport_sa

git+noreply at mindrot.org git+noreply at mindrot.org
Tue May 10 09:51:32 AEST 2016


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 332ff3d770631e7513fea38cf0d3689f673f0e3f
Author: Damien Miller <djm at mindrot.org>
Date:   Tue May 10 09:51:06 2016 +1000

    initialise salen in binresvport_sa
    
    avoids failures with UsePrivilegedPort=yes
    
    patch from Juan Gallego
---
 openbsd-compat/bindresvport.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/openbsd-compat/bindresvport.c b/openbsd-compat/bindresvport.c
index c89f214..eeb269d 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 */

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list