diff --git a/wget-1.16.1-5-digit-port-ftp-epsv-ipv6.patch b/wget-1.16.1-5-digit-port-ftp-epsv-ipv6.patch new file mode 100644 index 0000000..336e57f --- /dev/null +++ b/wget-1.16.1-5-digit-port-ftp-epsv-ipv6.patch @@ -0,0 +1,31 @@ +From 5e3a76073157510b1040578e70cb1234759a730f Mon Sep 17 00:00:00 2001 +From: Tim Ruehsen +Date: Sun, 4 Jan 2015 20:50:11 +0100 +Subject: [PATCH] src/ftp-basic.c: Accept 5-digit port numbers in EPSV + responses + +Reported-by: Adam Sampson +--- + src/ftp-basic.c | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/src/ftp-basic.c b/src/ftp-basic.c +index f9b9ad2..fdd6114 100644 +--- a/src/ftp-basic.c ++++ b/src/ftp-basic.c +@@ -788,12 +788,6 @@ ftp_epsv (int csock, ip_address *ip, int *port) + for (tport = 0, i = 0; i < 5 && c_isdigit (*s); i++, s++) + tport = (*s - '0') + 10 * tport; + +- if (i >= 5) +- { +- xfree (respline); +- return FTPINVPASV; +- } +- + /* Make sure that the response terminates correcty */ + if (*s++ != delim) + { +-- +2.1.0 + diff --git a/wget.spec b/wget.spec index 7ec98dc..d0c1e81 100644 --- a/wget.spec +++ b/wget.spec @@ -1,7 +1,7 @@ Summary: A utility for retrieving files using the HTTP or FTP protocols Name: wget Version: 1.16.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv3+ Group: Applications/Internet Url: http://www.gnu.org/software/wget/ @@ -11,6 +11,7 @@ Patch1: wget-rh-modified.patch Patch2: wget-1.16.1-path.patch Patch3: wget-1.16-dont-run-failing-test.patch Patch4: wget-1.16.1-fix-ftp-crash.patch +Patch5: wget-1.16.1-5-digit-port-ftp-epsv-ipv6.patch Provides: webclient Provides: bundled(gnulib) @@ -38,6 +39,7 @@ support for Proxy servers, and configurability. # upstream is working on fix and will be fixed most probably in 1.16.1 %patch3 -p1 -b .test %patch4 -p1 -b .ftp_crash +%patch5 -p1 -b .5_digit_port %build if pkg-config openssl ; then @@ -87,6 +89,9 @@ rm -rf $RPM_BUILD_ROOT %{_infodir}/* %changelog +* Mon Jan 12 2015 Tomas Hozza - 1.16.1-3 +- Fix wget to accept 5 digit port numbers in epsv responses over ipv6 (#1180777) + * Tue Dec 16 2014 Tomas Hozza - 1.16.1-2 - build wget with libpsl support (#1123616) - Fix NULL pointer dereference in FTP code (#1169022)