]> git.pld-linux.org Git - packages/crossmingw32-libxml2.git/blob - libxml2-zlib.patch
- from libxml2
[packages/crossmingw32-libxml2.git] / libxml2-zlib.patch
1 From a7e79f28689c574e0bbef17f4cb3da00249181ff Mon Sep 17 00:00:00 2001
2 From: Mark Adler <madler@alumni.caltech.edu>
3 Date: Tue, 19 Jan 2010 15:28:48 +0000
4 Subject: 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 ---
9 diff --git a/xmlIO.c b/xmlIO.c
10 index 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 --
32 cgit v0.8.3.1
This page took 0.062749 seconds and 3 git commands to generate.