From d58c6864e8820a4682b33acbe7608c0ab24f1c35 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 12 Feb 2007 13:14:55 +0000 Subject: [PATCH] - fix discarding of expired cookies - escape non-printable characters - drop to11 patch for now (#223754, #227853, #227498) --- wget-1.10.2-escapechars.patch | 34 ++++++++++++++++++++++++++++++++++ wget-1.10.2-texipod.patch | 12 ++++++++++++ wget.spec | 17 ++++++++++++++--- 3 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 wget-1.10.2-escapechars.patch create mode 100644 wget-1.10.2-texipod.patch diff --git a/wget-1.10.2-escapechars.patch b/wget-1.10.2-escapechars.patch new file mode 100644 index 0000000..23e3b4a --- /dev/null +++ b/wget-1.10.2-escapechars.patch @@ -0,0 +1,34 @@ +--- wget-1.10.2/src/http.c.escapechars 2007-02-12 06:18:40.000000000 -0500 ++++ wget-1.10.2/src/http.c 2007-02-12 06:18:20.000000000 -0500 +@@ -741,6 +741,20 @@ + xfree (resp); + } + ++/* Print a single line of response, the characters [b, e). We tried ++ getting away with ++ logprintf (LOG_VERBOSE, "%s%.*s\n", prefix, (int) (e - b), b); ++ but that failed to escape the non-printable characters and, in fact, ++ caused crashes in UTF-8 locales. */ ++ ++static void ++print_response_line(const char *prefix, const char *b, const char *e) ++{ ++ char *copy; ++ BOUNDED_TO_ALLOCA(b, e, copy); ++ logprintf (LOG_VERBOSE, "%s%s\n", prefix, escnonprint(copy)); ++} ++ + /* Print the server response, line by line, omitting the trailing CRLF + from individual header lines, and prefixed with PREFIX. */ + +@@ -759,9 +773,7 @@ + --e; + if (b < e && e[-1] == '\r') + --e; +- /* This is safe even on printfs with broken handling of "%.s" +- because resp->headers ends with \0. */ +- logprintf (LOG_VERBOSE, "%s%.*s\n", prefix, e - b, b); ++ print_response_line(prefix, b, e); + } + } + diff --git a/wget-1.10.2-texipod.patch b/wget-1.10.2-texipod.patch new file mode 100644 index 0000000..784190d --- /dev/null +++ b/wget-1.10.2-texipod.patch @@ -0,0 +1,12 @@ +diff -urN wget-1.10.2/doc/Makefile.in wget-1.10.2_new/doc/Makefile.in +--- wget-1.10.2/doc/Makefile.in 2005-06-06 22:42:17.000000000 +0200 ++++ wget-1.10.2_new/doc/Makefile.in 2006-06-27 12:04:36.000000000 +0200 +@@ -48,7 +48,7 @@ + INSTALL_DATA = @INSTALL_DATA@ + RM = rm -f + +-TEXI2POD = texi2pod.pl ++TEXI2POD = $(srcdir)/texi2pod.pl + POD2MAN = @POD2MAN@ + MAN = wget.$(manext) + WGETRC = $(sysconfdir)/wgetrc diff --git a/wget.spec b/wget.spec index 7dde5b4..1e731d7 100644 --- a/wget.spec +++ b/wget.spec @@ -11,10 +11,13 @@ Patch2: wget-1.10.2-rh1.patch Patch3: wget-1.10-path.patch Patch4: wget-1.9.1-docsyntax.patch Patch5: wget-1.10.1-helpfix.patch -Patch6: wget-1.10.2-to11.patch +#Patch6: wget-1.10.2-to11.patch Patch7: wget-1.10.2-218211.patch Patch8: wget-1.10.2-retry186195.patch Patch9: wget-1.10.2-CVE-2006-6719.patch +Patch10: wget-1.10.2-texipod.patch +Patch11: wget-1.10.2-cookies,patch +Patch12: wget-1.10.2-escapechars.patch Provides: webclient Requires(post): /sbin/install-info Requires(preun): /sbin/install-info @@ -36,13 +39,16 @@ support for Proxy servers, and configurability. %patch3 -p1 %patch4 -p1 %patch5 -p1 -%patch6 -p1 +#patch6 -p1 %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 cp %{SOURCE2} $RPM_BUILD_DIR/wget-%{version}/po/de.po -chmod a+x doc/texi2pod.pl +#chmod a+x doc/texi2pod.pl %build if pkg-config openssl ; then @@ -78,6 +84,11 @@ rm -rf $RPM_BUILD_ROOT %{_infodir}/* %changelog +* Mon Feb 12 2007 Karsten Hopp 1.10.2-14 +- fix discarding of expired cookies +- escape non-printable characters +- drop to11 patch for now (#223754, #227853, #227498) + * Mon Feb 05 2007 Karsten Hopp 1.10.2-14 - shut up rpmlint, even though xx isn't a macro