From: TJ S. <cas...@us...> - 2009-03-13 15:55:26
|
Update of /cvsroot/proftp/proftpd/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9485/src Modified Files: inet.c Log Message: Jesús Alastruey pointed out there was an off-by-one bug in the handling of the PassivePorts port selection code. The highest port number was not being properly shuffled. Index: inet.c =================================================================== RCS file: /cvsroot/proftp/proftpd/src/inet.c,v retrieving revision 1.113 retrieving revision 1.114 diff -u -r1.113 -r1.114 --- inet.c 12 Feb 2009 20:13:42 -0000 1.113 +++ inet.c 13 Mar 2009 15:55:17 -0000 1.114 @@ -489,13 +489,14 @@ * port will be from the range of as-yet untried ports. */ - while (++random_index < i) + while (++random_index <= i) range[random_index-1] = range[random_index]; } c = init_conn(p, servers, -1, bind_addr, ports[i], FALSE, FALSE); - if (!c && inet_errno != EADDRINUSE) { + if (!c && + inet_errno != EADDRINUSE) { pr_log_pri(PR_LOG_ERR, "error initializing connection: %s", strerror(inet_errno)); end_login(1); |