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
6 * xmlIO.c: remove an abuse of zlib API and use a clean interface
7 available in zlib >= 1.2.3
9 diff --git a/xmlIO.c b/xmlIO.c
10 index c03ac43..8fc00e3 100644
13 @@ -2518,6 +2518,9 @@ __xmlParserInputBufferCreateFilename(const char *URI, xmlCharEncoding enc) {
15 if ((xmlInputCallbackTable[i].opencallback == xmlGzfileOpen) &&
16 (strcmp(URI, "-") != 0)) {
17 +#if defined(ZLIB_VERNUM) && ZLIB_VERNUM >= 0x1230
18 + ret->compressed = !gzdirect(context);
20 if (((z_stream *)context)->avail_in > 4) {
22 cptr = (char *) ((z_stream *)context)->next_in;
23 @@ -2529,6 +2532,7 @@ __xmlParserInputBufferCreateFilename(const char *URI, xmlCharEncoding enc) {