]> git.pld-linux.org Git - packages/crossmingw32-libxml2.git/blame - libxml2-zlib.patch
- updated to 2.7.6 (based on libxml2.spec)
[packages/crossmingw32-libxml2.git] / libxml2-zlib.patch
CommitLineData
9bba9f1c
AF
1From a7e79f28689c574e0bbef17f4cb3da00249181ff Mon Sep 17 00:00:00 2001
2From: Mark Adler <madler@alumni.caltech.edu>
3Date: Tue, 19 Jan 2010 15:28:48 +0000
4Subject: libxml violates the zlib interface and crashes
5
6* xmlIO.c: remove an abuse of zlib API and use a clean interface
7 available in zlib >= 1.2.3
8---
9diff --git a/xmlIO.c b/xmlIO.c
10index c03ac43..8fc00e3 100644
11--- a/xmlIO.c
12+++ b/xmlIO.c
13@@ -2518,6 +2518,9 @@ __xmlParserInputBufferCreateFilename(const char *URI, xmlCharEncoding enc) {
14 #ifdef HAVE_ZLIB_H
15 if ((xmlInputCallbackTable[i].opencallback == xmlGzfileOpen) &&
16 (strcmp(URI, "-") != 0)) {
17+#if defined(ZLIB_VERNUM) && ZLIB_VERNUM >= 0x1230
18+ ret->compressed = !gzdirect(context);
19+#else
20 if (((z_stream *)context)->avail_in > 4) {
21 char *cptr, buff4[4];
22 cptr = (char *) ((z_stream *)context)->next_in;
23@@ -2529,6 +2532,7 @@ __xmlParserInputBufferCreateFilename(const char *URI, xmlCharEncoding enc) {
24 gzrewind(context);
25 }
26 }
27+#endif
28 }
29 #endif
30 }
31--
32cgit v0.8.3.1
This page took 0.052675 seconds and 4 git commands to generate.