diff options
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/libxml2/Makefile | 3 | ||||
-rw-r--r-- | textproc/libxml2/distinfo | 3 | ||||
-rw-r--r-- | textproc/libxml2/patches/patch-xzlib.c | 54 |
3 files changed, 58 insertions, 2 deletions
diff --git a/textproc/libxml2/Makefile b/textproc/libxml2/Makefile index 9905daad0d0..37d4f1c7d00 100644 --- a/textproc/libxml2/Makefile +++ b/textproc/libxml2/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.125 2013/05/26 09:22:14 adam Exp $ +# $NetBSD: Makefile,v 1.126 2013/11/25 23:30:23 wiz Exp $ DISTNAME= libxml2-2.9.1 +PKGREVISION= 1 CATEGORIES= textproc MASTER_SITES= ftp://xmlsoft.org/libxml2/ \ http://xmlsoft.org/sources/ diff --git a/textproc/libxml2/distinfo b/textproc/libxml2/distinfo index 5f321ae9d1e..cdc7f5722dc 100644 --- a/textproc/libxml2/distinfo +++ b/textproc/libxml2/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.101 2013/05/26 09:22:14 adam Exp $ +$NetBSD: distinfo,v 1.102 2013/11/25 23:30:23 wiz Exp $ SHA1 (libxml2-2.9.1.tar.gz) = eb3e2146c6d68aea5c2a4422ed76fe196f933c21 RMD160 (libxml2-2.9.1.tar.gz) = 257285d9ac070ed9f58666b7bd7c4653651c871b @@ -11,3 +11,4 @@ SHA1 (patch-ae) = 2823276343f65c7d244d22e548faa6a517445819 SHA1 (patch-ag) = 19afd69713298ecbd247ba733a7c0c13464ae572 SHA1 (patch-aj) = 988c30b4b09a1cbaf9e7db02bb8981da0f1beaa7 SHA1 (patch-threads.c) = 70bb0a779dff6611f755128d609f82360a492f9a +SHA1 (patch-xzlib.c) = 1fa0b97f3fb52c40c4df3933f269b9b0bbadb0ff diff --git a/textproc/libxml2/patches/patch-xzlib.c b/textproc/libxml2/patches/patch-xzlib.c new file mode 100644 index 00000000000..3fe047ec935 --- /dev/null +++ b/textproc/libxml2/patches/patch-xzlib.c @@ -0,0 +1,54 @@ +$NetBSD: patch-xzlib.c,v 1.1 2013/11/25 23:30:23 wiz Exp $ + +Fix bug in gzip decompression. +https://bugzilla.gnome.org/show_bug.cgi?id=712528 + +--- xzlib.c.orig 2013-02-27 05:08:52.000000000 +0000 ++++ xzlib.c +@@ -245,6 +245,20 @@ xz_avail(xz_statep state) + return 0; + } + ++#ifdef HAVE_ZLIB_H ++static int ++xz_avail_zstrm(xz_statep state) ++{ ++ int ret; ++ state->strm.avail_in = state->zstrm.avail_in; ++ state->strm.next_in = state->zstrm.next_in; ++ ret = xz_avail(state); ++ state->zstrm.avail_in = (uInt) state->strm.avail_in; ++ state->zstrm.next_in = (Bytef *) state->strm.next_in; ++ return ret; ++} ++#endif ++ + static int + is_format_xz(xz_statep state) + { +@@ -314,6 +328,10 @@ is_format_lzma(xz_statep state) + #define NEXT() ((strm->avail_in == 0 && xz_avail(state) == -1) ? -1 : \ + (strm->avail_in == 0 ? -1 : \ + (strm->avail_in--, *(strm->next_in)++))) ++/* Same thing, but from zstrm */ ++#define NEXTZ() ((strm->avail_in == 0 && xz_avail_zstrm(state) == -1) ? -1 : \ ++ (strm->avail_in == 0 ? -1 : \ ++ (strm->avail_in--, *(strm->next_in)++))) + + /* Get a four-byte little-endian integer and return 0 on success and the value + in *ret. Otherwise -1 is returned and *ret is not modified. */ +@@ -324,10 +342,10 @@ gz_next4(xz_statep state, unsigned long + unsigned long val; + z_streamp strm = &(state->zstrm); + +- val = NEXT(); +- val += (unsigned) NEXT() << 8; +- val += (unsigned long) NEXT() << 16; +- ch = NEXT(); ++ val = NEXTZ(); ++ val += (unsigned) NEXTZ() << 8; ++ val += (unsigned long) NEXTZ() << 16; ++ ch = NEXTZ(); + if (ch == -1) + return -1; + val += (unsigned long) ch << 24; |