summaryrefslogtreecommitdiffstats
path: root/main/libxml2/zlib.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-01-30 16:00:41 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-01-30 16:00:41 +0000
commit079d11998b9a2998a4f603e238f37d3559ce673c (patch)
treee2cc284e13a5c505dc8521598d545e57f30e13bc /main/libxml2/zlib.patch
parentd4152a1f83590fbed81dbc45d7d54a8ed7ad9fc0 (diff)
downloadaports-079d11998b9a2998a4f603e238f37d3559ce673c.tar.bz2
aports-079d11998b9a2998a4f603e238f37d3559ce673c.tar.xz
main/libxml2: patch abuse of zlib API
Diffstat (limited to 'main/libxml2/zlib.patch')
-rw-r--r--main/libxml2/zlib.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/main/libxml2/zlib.patch b/main/libxml2/zlib.patch
new file mode 100644
index 000000000..4bf486d12
--- /dev/null
+++ b/main/libxml2/zlib.patch
@@ -0,0 +1,32 @@
+From a7e79f28689c574e0bbef17f4cb3da00249181ff Mon Sep 17 00:00:00 2001
+From: Mark Adler <madler@alumni.caltech.edu>
+Date: Tue, 19 Jan 2010 15:28:48 +0000
+Subject: libxml violates the zlib interface and crashes
+
+* xmlIO.c: remove an abuse of zlib API and use a clean interface
+ available in zlib >= 1.2.3
+---
+diff --git a/xmlIO.c b/xmlIO.c
+index c03ac43..8fc00e3 100644
+--- a/xmlIO.c
++++ b/xmlIO.c
+@@ -2518,6 +2518,9 @@ __xmlParserInputBufferCreateFilename(const char *URI, xmlCharEncoding enc) {
+ #ifdef HAVE_ZLIB_H
+ if ((xmlInputCallbackTable[i].opencallback == xmlGzfileOpen) &&
+ (strcmp(URI, "-") != 0)) {
++#if defined(ZLIB_VERNUM) && ZLIB_VERNUM >= 0x1230
++ ret->compressed = !gzdirect(context);
++#else
+ if (((z_stream *)context)->avail_in > 4) {
+ char *cptr, buff4[4];
+ cptr = (char *) ((z_stream *)context)->next_in;
+@@ -2529,6 +2532,7 @@ __xmlParserInputBufferCreateFilename(const char *URI, xmlCharEncoding enc) {
+ gzrewind(context);
+ }
+ }
++#endif
+ }
+ #endif
+ }
+--
+cgit v0.8.3.1