update to 2.7.6

This commit is contained in:
steven 2009-10-11 10:39:42 +00:00
parent 3373840808
commit 210b01fbaf
12 changed files with 50 additions and 198 deletions

View File

@ -1,16 +1,16 @@
# $OpenBSD: Makefile,v 1.121 2009/08/13 09:29:47 sthen Exp $
# $OpenBSD: Makefile,v 1.122 2009/10/11 10:39:42 steven Exp $
COMMENT-main= XML parsing library
COMMENT-python= Python bindings for libxml
VERSION= 2.6.32
VERSION= 2.7.6
DISTNAME= libxml2-${VERSION}
PKGNAME-main= libxml-${VERSION}p3
PKGNAME-python= py-libxml-${VERSION}p1
SHARED_LIBS= xml2 10.0
PKGNAME-main= libxml-${VERSION}
PKGNAME-python= py-libxml-${VERSION}
SHARED_LIBS= xml2 11.0
CATEGORIES= textproc
MASTER_SITES= ftp://xmlsoft.org/libxml/ \
${MASTER_SITE_GNOME:=sources/libxml2/2.6/}
${MASTER_SITE_GNOME:=sources/libxml2/2.7/}
HOMEPAGE= http://xmlsoft.org/
@ -45,8 +45,10 @@ RUN_DEPENDS-main=
.if !${FLAVOR:L:Mno_python}
MULTI_PACKAGES+= -python
MODULES+= lang/python
LIB_DEPENDS-python= xml2.>=9::textproc/libxml,-main \
LIB_DEPENDS-python= xml2.>=11::textproc/libxml,-main \
${MODPY_LIB_DEPENDS} \
${MODLIBICONV_LIB_DEPENDS}
WANTLIB-python= m z util
FAKE_FLAGS= EXAMPLE_DIR=${PREFIX}/share/examples/libxml2/
.endif

View File

@ -1,5 +1,5 @@
MD5 (libxml2-2.6.32.tar.gz) = JiHTIsFvAlfjDw/ysTOE3g==
RMD160 (libxml2-2.6.32.tar.gz) = 7bnJqBPssS6yFNH3XZJ6yzgUgxw=
SHA1 (libxml2-2.6.32.tar.gz) = HEZcDvnSG7Sn3wLU7frX3+HiY98=
SHA256 (libxml2-2.6.32.tar.gz) = G0QouHmvyq48IBOyEoO6rQQGYfvVAuiT6DrcPRXIXVM=
SIZE (libxml2-2.6.32.tar.gz) = 4722227
MD5 (libxml2-2.7.6.tar.gz) = d0Co7COHii9QEg4fqicw8g==
RMD160 (libxml2-2.7.6.tar.gz) = hJ3te2H4jnXvDazw5WR86K2VEmE=
SHA1 (libxml2-2.7.6.tar.gz) = sPa/hAjnWaxLi5ZQAF7oreqRHh0=
SHA256 (libxml2-2.7.6.tar.gz) = I4xPAgPAEuV3ZSJkDA+zrFMsQGSYHBzj50wAt1UB12E=
SIZE (libxml2-2.7.6.tar.gz) = 4854591

View File

@ -1,6 +1,6 @@
--- Makefile.in.orig Tue Apr 8 16:55:03 2008
+++ Makefile.in Sat Apr 26 10:51:02 2008
@@ -584,7 +584,7 @@ testModule_DEPENDENCIES = $(DEPS)
--- Makefile.in.orig Tue Oct 6 18:39:59 2009
+++ Makefile.in Sat Oct 10 16:35:20 2009
@@ -675,7 +675,7 @@ testModule_DEPENDENCIES = $(DEPS)
testModule_LDADD = $(LDADDS)
noinst_LTLIBRARIES = testdso.la
testdso_la_SOURCES = testdso.c
@ -9,16 +9,25 @@
testapi_SOURCES = testapi.c
testapi_LDFLAGS =
testapi_DEPENDENCIES = $(DEPS)
@@ -613,7 +613,7 @@ pkgconfig_DATA = libxml-2.0.pc
@@ -708,7 +708,7 @@ pkgconfig_DATA = libxml-2.0.pc
# Install the tests program sources as examples
#
BASE_DIR = $(datadir)/doc
-DOC_MODULE = libxml2-$(VERSION)
+DOC_MODULE = libxml2
EXAMPLES_DIR = $(BASE_DIR)/$(DOC_MODULE)/examples
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -1990,6 +1990,7 @@ SVGtests : xmllint$(EXEEXT)
#
@@ -1706,7 +1706,7 @@ testapi.c: $(srcdir)/gentest.py
#testOOM_LDADD= $(LDADDS)
runtests:
- $(CHECKER) ./runtest$(EXEEXT) && $(CHECKER) ./testrecurse$(EXEEXT) &&$(CHECKER) ./testapi$(EXEEXT) && $(CHECKER) ./testchar$(EXEEXT)&& $(CHECKER) ./testdict$(EXEEXT) && $(CHECKER) ./runxmlconf$(EXEEXT)
+ $(CHECKER) ./runtest$(EXEEXT) ; $(CHECKER) ./testrecurse$(EXEEXT) &&$(CHECKER) ./testapi$(EXEEXT) && $(CHECKER) ./testchar$(EXEEXT)&& $(CHECKER) ./testdict$(EXEEXT) && $(CHECKER) ./runxmlconf$(EXEEXT)
@(if [ "@PYTHON_SUBDIR@" != "" ] ; then cd python ; \
$(MAKE) MAKEFLAGS+=--silent tests ; fi)
@@ -2211,6 +2211,7 @@ SVGtests : xmllint$(EXEEXT)
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
else \
echo Testing $$name ; \

View File

@ -1,39 +0,0 @@
$OpenBSD: patch-SAX2_c,v 1.1 2008/11/23 18:49:42 naddy Exp $
--- SAX2.c.orig Fri Jan 25 14:10:04 2008
+++ SAX2.c Sun Nov 23 18:24:46 2008
@@ -11,6 +11,7 @@
#include "libxml.h"
#include <stdlib.h>
#include <string.h>
+#include <limits.h>
#include <libxml/xmlmemory.h>
#include <libxml/tree.h>
#include <libxml/parser.h>
@@ -26,6 +27,11 @@
#include <libxml/HTMLtree.h>
#include <libxml/globals.h>
+/* Define SIZE_T_MAX unless defined through <limits.h>. */
+#ifndef SIZE_T_MAX
+# define SIZE_T_MAX ((size_t)-1)
+#endif /* !SIZE_T_MAX */
+
/* #define DEBUG_SAX2 */
/* #define DEBUG_SAX2_TREE */
@@ -2445,9 +2451,14 @@ xmlSAX2Characters(void *ctx, const xmlChar *ch, int le
(xmlDictOwns(ctxt->dict, lastChild->content))) {
lastChild->content = xmlStrdup(lastChild->content);
}
+ if ((size_t)ctxt->nodelen > SIZE_T_MAX - (size_t)len ||
+ (size_t)ctxt->nodemem + (size_t)len > SIZE_T_MAX / 2) {
+ xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters overflow prevented");
+ return;
+ }
if (ctxt->nodelen + len >= ctxt->nodemem) {
xmlChar *newbuf;
- int size;
+ size_t size;
size = ctxt->nodemem + len;
size *= 2;

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-configure,v 1.18 2008/05/06 18:53:01 steven Exp $
--- configure.orig Tue Apr 8 16:48:27 2008
+++ configure Sat Apr 26 10:51:02 2008
@@ -27302,7 +27302,7 @@ fi
fi
if test "$with_python" != ""
then
- pythondir='$(PYTHON_SITE_PACKAGES)'
+ pythondir='${PYTHON_SITE_PACKAGES}'
else
pythondir='$(libdir)/python$(PYTHON_VERSION)/site-packages'
fi

View File

@ -1,81 +0,0 @@
$OpenBSD: patch-parser_c,v 1.3 2009/08/13 09:29:47 sthen Exp $
fix CVE-2009-2414, CVE-2009-2416, from Daniel Veillard via
redhat bug 515195
--- parser.c.orig Tue Apr 8 15:47:58 2008
+++ parser.c Thu Aug 13 10:04:54 2009
@@ -4893,10 +4893,14 @@ xmlParseNotationType(xmlParserCtxtPtr ctxt) {
if (name == NULL) {
xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED,
"Name expected in NOTATION declaration\n");
- return(ret);
+ xmlFreeEnumeration(ret);
+ return(NULL);
}
cur = xmlCreateEnumeration(name);
- if (cur == NULL) return(ret);
+ if (cur == NULL) {
+ xmlFreeEnumeration(ret);
+ return(NULL);
+ }
if (last == NULL) ret = last = cur;
else {
last->next = cur;
@@ -4906,9 +4910,8 @@ xmlParseNotationType(xmlParserCtxtPtr ctxt) {
} while (RAW == '|');
if (RAW != ')') {
xmlFatalErr(ctxt, XML_ERR_NOTATION_NOT_FINISHED, NULL);
- if ((last != NULL) && (last != ret))
- xmlFreeEnumeration(last);
- return(ret);
+ xmlFreeEnumeration(ret);
+ return(NULL);
}
NEXT;
return(ret);
@@ -4949,7 +4952,10 @@ xmlParseEnumerationType(xmlParserCtxtPtr ctxt) {
}
cur = xmlCreateEnumeration(name);
xmlFree(name);
- if (cur == NULL) return(ret);
+ if (cur == NULL) {
+ xmlFreeEnumeration(ret);
+ return(NULL);
+ }
if (last == NULL) ret = last = cur;
else {
last->next = cur;
@@ -5351,6 +5357,12 @@ xmlParseElementChildrenContentDecl (xmlParserCtxtPtr c
const xmlChar *elem;
xmlChar type = 0;
+ if (ctxt->depth > 128) {
+ xmlFatalErrMsgInt(ctxt, XML_ERR_ELEMCONTENT_NOT_FINISHED,
+ "xmlParseElementChildrenContentDecl : depth %d too deep\n",
+ ctxt->depth);
+ return(NULL);
+ }
SKIP_BLANKS;
GROW;
if (RAW == '(') {
@@ -5359,7 +5371,9 @@ xmlParseElementChildrenContentDecl (xmlParserCtxtPtr c
/* Recurse on first child */
NEXT;
SKIP_BLANKS;
+ ctxt->depth++;
cur = ret = xmlParseElementChildrenContentDecl(ctxt, inputid);
+ ctxt->depth--;
SKIP_BLANKS;
GROW;
} else {
@@ -5491,7 +5505,9 @@ xmlParseElementChildrenContentDecl (xmlParserCtxtPtr c
/* Recurse on second child */
NEXT;
SKIP_BLANKS;
+ ctxt->depth++;
last = xmlParseElementChildrenContentDecl(ctxt, inputid);
+ ctxt->depth--;
SKIP_BLANKS;
} else {
elem = xmlParseName(ctxt);

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-python_Makefile_in,v 1.9 2008/05/06 18:53:01 steven Exp $
--- python/Makefile.in.orig Tue Apr 8 16:55:02 2008
+++ python/Makefile.in Sat Apr 26 11:53:47 2008
@@ -737,7 +737,7 @@ info: info-recursive
$OpenBSD: patch-python_Makefile_in,v 1.10 2009/10/11 10:39:42 steven Exp $
--- python/Makefile.in.orig Tue Oct 6 18:39:58 2009
+++ python/Makefile.in Sat Oct 10 16:33:46 2009
@@ -821,7 +821,7 @@ info: info-recursive
info-am:

View File

@ -1,8 +1,8 @@
$OpenBSD: patch-python_tests_Makefile_in,v 1.8 2008/05/06 18:53:01 steven Exp $
--- python/tests/Makefile.in.orig Tue Apr 8 16:55:02 2008
+++ python/tests/Makefile.in Sat Apr 26 11:59:41 2008
@@ -270,7 +270,7 @@ sysconfdir = @sysconfdir@
target_alias = @target_alias@
$OpenBSD: patch-python_tests_Makefile_in,v 1.9 2009/10/11 10:39:42 steven Exp $
--- python/tests/Makefile.in.orig Tue Oct 6 18:39:58 2009
+++ python/tests/Makefile.in Sat Oct 10 16:33:46 2009
@@ -292,7 +292,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-exampledir = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION)/examples
@ -10,7 +10,7 @@ $OpenBSD: patch-python_tests_Makefile_in,v 1.8 2008/05/06 18:53:01 steven Exp $
dist_example_DATA = $(PYTESTS) $(XMLS)
PYTESTS = \
build.py \
@@ -307,7 +307,6 @@ PYTESTS = \
@@ -329,7 +329,6 @@ PYTESTS = \
readererr.py\
relaxng.py \
schema.py \

View File

@ -1,27 +0,0 @@
$OpenBSD: patch-tree_c,v 1.1 2008/11/23 18:49:42 naddy Exp $
--- tree.c.orig Tue Apr 8 15:54:48 2008
+++ tree.c Sun Nov 23 18:28:13 2008
@@ -14,7 +14,7 @@
#include "libxml.h"
#include <string.h> /* for memset() only ! */
-
+#include <limits.h>
#ifdef HAVE_CTYPE_H
#include <ctype.h>
#endif
@@ -6916,7 +6916,13 @@ xmlBufferResize(xmlBufferPtr buf, unsigned int size)
case XML_BUFFER_ALLOC_DOUBLEIT:
/*take care of empty case*/
newSize = (buf->size ? buf->size*2 : size + 10);
- while (size > newSize) newSize *= 2;
+ while (size > newSize) {
+ if (newSize > UINT_MAX / 2) {
+ xmlTreeErrMemory("growing buffer");
+ return 0;
+ }
+ newSize *= 2;
+ }
break;
case XML_BUFFER_ALLOC_EXACT:
newSize = size+10;

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-xstc_Makefile_in,v 1.2 2008/05/06 18:53:01 steven Exp $
--- xstc/Makefile.in.orig Tue Apr 8 16:55:02 2008
+++ xstc/Makefile.in Sat Apr 26 10:51:02 2008
@@ -471,7 +471,7 @@ $(TESTDIRS) Tests/Metadata/$(NISTTESTDEF_2) Tests/Meta
$OpenBSD: patch-xstc_Makefile_in,v 1.3 2009/10/11 10:39:42 steven Exp $
--- xstc/Makefile.in.orig Tue Oct 6 18:39:58 2009
+++ xstc/Makefile.in Sat Oct 10 16:33:46 2009
@@ -497,7 +497,7 @@ $(TESTDIRS) Tests/Metadata/$(NISTTESTDEF_2) Tests/Meta
else echo "Dont' know how to fetch $(TARBALLURL_2)" ; fi ; fi ; fi)
-@(if [ -f $(TARBALL_2) ] ; then \
echo -n "extracting test data (NIST)..." ; \
@ -10,7 +10,7 @@ $OpenBSD: patch-xstc_Makefile_in,v 1.2 2008/05/06 18:53:01 steven Exp $
echo "done" ; \
fi)
-@(if [ ! -f $(TARBALL) ] ; then \
@@ -483,7 +483,7 @@ $(TESTDIRS) Tests/Metadata/$(NISTTESTDEF_2) Tests/Meta
@@ -509,7 +509,7 @@ $(TESTDIRS) Tests/Metadata/$(NISTTESTDEF_2) Tests/Meta
else echo "Dont' know how to fetch $(TARBALLURL)" ; fi ; fi ; fi)
-@(if [ -f $(TARBALL) ] ; then \
echo -n "extracting test data (Sun, Microsoft)..." ; \

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PFRAG.shared-python,v 1.3 2008/05/06 18:53:01 steven Exp $
@comment $OpenBSD: PFRAG.shared-python,v 1.4 2009/10/11 10:39:42 steven Exp $
lib/python${MODPY_VERSION}/
lib/python${MODPY_VERSION}/site-packages/
lib/python${MODPY_VERSION}/site-packages/drv_libxml2.py
@ -55,5 +55,6 @@ share/examples/libxml2/validate.py
share/examples/libxml2/walker.py
share/examples/libxml2/xpath.py
share/examples/libxml2/xpathext.py
share/examples/libxml2/xpathleak.py
share/examples/libxml2/xpathns.py
share/examples/libxml2/xpathret.py

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST-main,v 1.5 2009/08/13 09:29:47 sthen Exp $
@comment $OpenBSD: PLIST-main,v 1.6 2009/10/11 10:39:42 steven Exp $
@pkgpath textproc/libxml
%%SHARED%%
bin/xml2-config
@ -58,13 +58,12 @@ lib/libxml2.la
lib/pkgconfig/
lib/pkgconfig/libxml-2.0.pc
lib/xml2Conf.sh
share/aclocal/
share/aclocal/libxml.m4
@endfake
@man man/man1/xml2-config.1
@man man/man1/xmlcatalog.1
@man man/man1/xmllint.1
@man man/man3/libxml.3
share/aclocal/
share/aclocal/libxml.m4
share/doc/libxml2/
share/doc/libxml2/Copyright
share/doc/libxml2/examples/