From owner-freebsd-gnome@FreeBSD.ORG Wed Mar 17 19:42:29 2010 Return-Path: Delivered-To: gnome@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58056106564A; Wed, 17 Mar 2010 19:42:29 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 2DDA68FC1A; Wed, 17 Mar 2010 19:42:29 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o2HJgTgg019900; Wed, 17 Mar 2010 19:42:29 GMT (envelope-from delphij@freefall.freebsd.org) Received: (from delphij@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o2HJgTnJ019899; Wed, 17 Mar 2010 19:42:29 GMT (envelope-from delphij) Date: Wed, 17 Mar 2010 19:42:29 GMT Message-Id: <201003171942.o2HJgTnJ019899@freefall.freebsd.org> To: FreeBSD-gnats-submit@freebsd.org From: Xin LI X-send-pr-version: 3.113 X-GNATS-Notify: Cc: gnome@freebsd.org Subject: [PATCH] Fix ABI abuse in libxml2 X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Xin LI List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2010 19:42:29 -0000 >Submitter-Id: current-users >Originator: Xin LI >Organization: iXsystems, Inc. >Confidential: no >Synopsis: [PATCH] Fix ABI abuse in libxml2 >Severity: critical >Priority: high >Category: ports >Class: sw-bug >Release: FreeBSD 8.0-STABLE i386 >Environment: System: FreeBSD freefall.freebsd.org 8.0-STABLE FreeBSD 8.0-STABLE #42 r204803: Sat Mar 6 21:21:56 UTC 2010 simon@freefall.freebsd.org:/usr/src/sys/i386/compile/FREEFALL i386 >Description: libxml2 knows too much about zlib's internals. With the upcoming update, it would break. I'm thinking about making the -STABLE zlib use a different ABI but the real fix is to use gzdirect() instead of twiddling with zlib internal bits. >How-To-Repeat: Update base system zlib to 1.2.4 and everything using libxml2 to read configuration would be broken. >Fix: --- libxml2.diff begins here --- Index: Makefile =================================================================== RCS file: /home/ncvs/ports/textproc/libxml2/Makefile,v retrieving revision 1.162 diff -u -p -r1.162 Makefile --- Makefile 1 Dec 2009 09:48:07 -0000 1.162 +++ Makefile 17 Mar 2010 19:35:36 -0000 @@ -12,7 +12,7 @@ PORTNAME= libxml2 PORTVERSION= 2.7.6 -PORTREVISION?= 1 +PORTREVISION?= 2 CATEGORIES?= textproc gnome MASTER_SITES= ftp://fr.rpmfind.net/pub/libxml/ \ ftp://gd.tuwien.ac.at/pub/libxml/ \ Index: files/patch-xmlIO.c =================================================================== RCS file: files/patch-xmlIO.c diff -N files/patch-xmlIO.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-xmlIO.c 17 Mar 2010 19:35:06 -0000 @@ -0,0 +1,20 @@ +--- ./xmlIO.c.orig 2009-09-24 08:32:00.000000000 -0700 ++++ ./xmlIO.c 2010-03-17 12:35:00.957293884 -0700 +@@ -2518,6 +2518,9 @@ + #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 @@ + gzrewind(context); + } + } ++#endif + } + #endif + } --- libxml2.diff ends here ---