- fix discarding of expired cookies

- escape non-printable characters
- drop to11 patch for now (#223754, #227853, #227498)
This commit is contained in:
Karsten Hopp 2007-02-12 13:14:55 +00:00
parent 2889695610
commit d58c6864e8
3 changed files with 60 additions and 3 deletions

View File

@ -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 "%.<n>s"
- because resp->headers ends with \0. */
- logprintf (LOG_VERBOSE, "%s%.*s\n", prefix, e - b, b);
+ print_response_line(prefix, b, e);
}
}

12
wget-1.10.2-texipod.patch Normal file
View File

@ -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

View File

@ -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 <karsten@redhat.com> 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 <karsten@redhat.com> 1.10.2-14
- shut up rpmlint, even though xx isn't a macro