.gear-rules | 2 + .../962b3c18ad7f6d38a63c583bb9e07dc5a135bbbe | 13 + .../fa8fb84f3e32d26d99703e83ad3a41f4f925e7b7 | 13 + .gear-tags/list | 2 + Makefile.am | 7 +- SAX2.c | 3 +- configure.in | 3 - doc/Makefile.am | 2 + doc/devhelp/Makefile.am | 1 + include/libxml/parser.h | 1 + libxml2.map | 173 ++++++ libxml2.spec | 647 ++++++++++++++++++++ parser.c | 42 ++- parserInternals.c | 1 + python/Makefile.am | 4 +- python/tests/Makefile.am | 2 +- xstc/Makefile.am | 2 + 17 files changed, 902 insertions(+), 16 deletions(-) diff --git a/.gear-rules b/.gear-rules new file mode 100644 index 0000000..1538fa5 --- /dev/null +++ b/.gear-rules @@ -0,0 +1,2 @@ +tar: @version@:. name=libxml2-@version@ +diff: @version@:. . diff --git a/.gear-tags/962b3c18ad7f6d38a63c583bb9e07dc5a135bbbe b/.gear-tags/962b3c18ad7f6d38a63c583bb9e07dc5a135bbbe new file mode 100644 index 0000000..feaad60 --- /dev/null +++ b/.gear-tags/962b3c18ad7f6d38a63c583bb9e07dc5a135bbbe @@ -0,0 +1,13 @@ +object 4b682473db280a0ffc3038926dc709a937327a6a +type commit +tag 2.6.32 +tagger Alexey Tourbin 1208777922 +0400 + +2.6.32 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iEYEABECAAYFAkgMfMIACgkQfBKgtDjnu0ZzWwCeK6g2VFxigNqRDAfYssysgSJJ +VeQAmgPMQbWoadvUrLD///tS6oIOfkj/ +=5Imk +-----END PGP SIGNATURE----- diff --git a/.gear-tags/fa8fb84f3e32d26d99703e83ad3a41f4f925e7b7 b/.gear-tags/fa8fb84f3e32d26d99703e83ad3a41f4f925e7b7 new file mode 100644 index 0000000..76d22be --- /dev/null +++ b/.gear-tags/fa8fb84f3e32d26d99703e83ad3a41f4f925e7b7 @@ -0,0 +1,13 @@ +object 0f538aca689a47ac8ee86c409b8842c2239fc763 +type commit +tag 2.6.31 +tagger Alexey Tourbin 1200270062 +0300 + +verified against ftp://xmlsoft.org/libxml2/libxml2-2.6.31.tar.gz +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.8 (GNU/Linux) + +iEYEABECAAYFAkeKqu4ACgkQfBKgtDjnu0ZDgACgraac3ZxyUuO38B4gLAYYh1NG +B0AAoLJqZX7OFogo7a3ZuQqPk42DXh8w +=LklS +-----END PGP SIGNATURE----- diff --git a/.gear-tags/list b/.gear-tags/list new file mode 100644 index 0000000..893adf3 --- /dev/null +++ b/.gear-tags/list @@ -0,0 +1,2 @@ +fa8fb84f3e32d26d99703e83ad3a41f4f925e7b7 2.6.31 +962b3c18ad7f6d38a63c583bb9e07dc5a135bbbe 2.6.32 diff --git a/Makefile.am b/Makefile.am index 5061f46..e9afce9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to produce Makefile.in -SUBDIRS = include . doc example xstc @PYTHON_SUBDIR@ +SUBDIRS = include . doc example @PYTHON_SUBDIR@ DIST_SUBDIRS = include . doc example python xstc @@ -17,7 +17,8 @@ bin_SCRIPTS=xml2-config lib_LTLIBRARIES = libxml2.la libxml2_la_LIBADD = @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) @M_LIBS@ @WIN32_EXTRA_LIBADD@ -libxml2_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ -version-info @LIBXML_VERSION_INFO@ @MODULE_PLATFORM_LIBS@ +export_symbols = -Wl,--version-script=libxml2.map -Wl,-z,defs +libxml2_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ -version-info @LIBXML_VERSION_INFO@ $(export_symbols) @MODULE_PLATFORM_LIBS@ if WITH_TRIO_SOURCES libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \ @@ -1073,7 +1074,7 @@ SchemasPythonTests: echo "## It is normal to see 11 errors reported" ; \ $(CHECKER) $(PYTHON) $(srcdir)/check-xsddata-test-suite.py ; \ fi) - @(if [ -x $(PYTHON) -a -d xstc ] ; then cd xstc ; $(MAKE) CHECKER="$(CHECKER)" MAKEFLAGS+=--silent pytests ; fi) +# @(if [ -x $(PYTHON) -a -d xstc ] ; then cd xstc ; $(MAKE) CHECKER="$(CHECKER)" MAKEFLAGS+=--silent pytests ; fi) Patterntests: xmllint$(EXEEXT) @(echo > .memdump) diff --git a/SAX2.c b/SAX2.c index 7dbc2b2..06be49a 100644 --- a/SAX2.c +++ b/SAX2.c @@ -580,7 +580,8 @@ xmlSAX2GetEntity(void *ctx, const xmlChar *name) return(NULL); } ret->owner = 1; - ret->checked = 1; + if (ret->checked == 0) + ret->checked = 1; } return(ret); } diff --git a/configure.in b/configure.in index 8fc76e5..d5c31b6 100644 --- a/configure.in +++ b/configure.in @@ -48,9 +48,6 @@ AC_PATH_PROG(RM, rm, /bin/rm) AC_PATH_PROG(MV, mv, /bin/mv) AC_PATH_PROG(TAR, tar, /bin/tar) AC_PATH_PROG(PERL, perl, /usr/bin/perl) -AC_PATH_PROG(WGET, wget, /usr/bin/wget) -AC_PATH_PROG(XMLLINT, xmllint, /usr/bin/xmllint) -AC_PATH_PROG(XSLTPROC, xsltproc, /usr/bin/xsltproc) dnl Make sure we have an ANSI compiler AM_C_PROTOTYPES diff --git a/doc/Makefile.am b/doc/Makefile.am index 55c5ef5..0beccde 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -25,6 +25,8 @@ EXTRA_DIST=xmlcatalog_man.xml tutorial/*.html tutorial/*.c tutorial/*.pdf \ man_MANS = xmllint.1 xmlcatalog.1 +XSLTPROC=/usr/bin/xsltproc +XMLLINT=$(top_builddir)/xmllint all: web $(top_builddir)/NEWS libxml2.xsa $(man_MANS) diff --git a/doc/devhelp/Makefile.am b/doc/devhelp/Makefile.am index 0264010..122a7fd 100644 --- a/doc/devhelp/Makefile.am +++ b/doc/devhelp/Makefile.am @@ -57,6 +57,7 @@ EXTRA_FORMAT= \ style.css EXTRA_DIST=devhelp.xsl html.xsl libxml2.devhelp $(HTML_FILES) $(EXTRA_FORMAT) +XSLTPROC=/usr/bin/xsltproc all: libxml2.devhelp $(HTML_FILES) diff --git a/include/libxml/parser.h b/include/libxml/parser.h index fe63bda..5d38f75 100644 --- a/include/libxml/parser.h +++ b/include/libxml/parser.h @@ -297,6 +297,7 @@ struct _xmlParserCtxt { */ xmlError lastError; xmlParserMode parseMode; /* the parser mode */ + unsigned long nbentities; /* number of entities references */ }; /** diff --git a/libxml2.map b/libxml2.map new file mode 100644 index 0000000..c48d02c --- /dev/null +++ b/libxml2.map @@ -0,0 +1,173 @@ +LIBXML2_2.6.13 { + global: + xmlParseInNodeContext; + xmlSchemaGetFacetValueAsULong; + xmlSchemaGetParserErrors; + xmlSchemaGetValidErrors; + xmlSchemaValPredefTypeNodeNoNorm; + xmlSchemaValidateLengthFacet; +}; +LIBXML2_2.6.14 { + global: + xmlAutomataNewCountTrans2; + xmlAutomataNewOnceTrans2; + xmlSchemaSetValidOptions; + xmlSchemaValidCtxtGetOptions; + xmlSchemaValidateOneElement; +}; +LIBXML2_2.6.15 { + global: + xmlDebugCheckDocument; + xmlDocCopyNodeList; + xmlNewDocPI; + xmlTextReaderConstEncoding; + xmlTextReaderConstXmlVersion; + xmlTextReaderIsNamespaceDecl; + xmlTextReaderStandalone; +}; +LIBXML2_2.6.16 { + global: + xmlMemBlocks; + xmlRelaxNGInitTypes; +}; +LIBXML2_2.6.17 { + global: + xmlDictExists; + xmlModuleClose; + xmlModuleFree; + xmlModuleOpen; + xmlModuleSymbol; + xmlRegExecErrInfo; + xmlRegExecNextValues; + xmlSchemaWhiteSpaceReplace; + xmlTextReaderGetParserColumnNumber; + xmlTextReaderGetParserLineNumber; +}; +LIBXML2_2.6.18 { + global: + xmlCopyDocElementContent; + xmlDictCleanup; + xmlFreeDocElementContent; + xmlFreeStreamCtxt; + xmlHashCreateDict; + xmlNewDocElementContent; + xmlPatternFromRoot; + xmlPatternGetStreamCtxt; + xmlPatternMaxDepth; + xmlPatternStreamable; + xmlSchemaCompareValuesWhtsp; + xmlSchemaCopyValue; + xmlSchemaGetCanonValue; + xmlSchemaNewNOTATIONValue; + xmlSchemaNewStringValue; + xmlStreamPop; + xmlStreamPush; + xmlStreamPushAttr; + xmlTextReaderByteConsumed; +}; +LIBXML2_2.6.19 { + global: + xmlSchemaGetValType; + xmlSchemaValidateFacetWhtsp; + xmlSchemaValidateLengthFacetWhtsp; +}; +LIBXML2_2.6.20 { + global: + xmlDOMWrapAdoptNode; + xmlDOMWrapFreeCtxt; + xmlDOMWrapNewCtxt; + xmlDOMWrapReconcileNamespaces; + xmlDOMWrapRemoveNode; + xmlSchemaGetCanonValueWhtsp; + xmlSchemaIsValid; + xmlSchemaNewQNameValue; + xmlSchemaSAXPlug; + xmlSchemaSAXUnplug; + xmlSchemaValidateFile; + xmlSchemaValueAppend; + xmlSchemaValueGetAsBoolean; + xmlSchemaValueGetAsString; + xmlSchemaValueGetNext; + xmlTextReaderSchemaValidate; + xmlTextReaderSetSchema; +}; +LIBXML2_2.6.21 { + global: + emptyExp; + forbiddenExp; + xmlAutomataNewNegTrans; + xmlExpCtxtNbCons; + xmlExpCtxtNbNodes; + xmlExpDump; + xmlExpExpDerive; + xmlExpFree; + xmlExpFreeCtxt; + xmlExpGetLanguage; + xmlExpGetStart; + xmlExpIsNillable; + xmlExpMaxToken; + xmlExpNewAtom; + xmlExpNewCtxt; + xmlExpNewOr; + xmlExpNewRange; + xmlExpNewSeq; + xmlExpParse; + xmlExpRef; + xmlExpStringDerive; + xmlExpSubsume; + xmlHasFeature; + xmlParseURIRaw; + xmlPatternMinDepth; + xmlRelaxNGSetValidStructuredErrors; + xmlSchemaSetValidStructuredErrors; + xmlSchematronFree; + xmlSchematronFreeParserCtxt; + xmlSchematronFreeValidCtxt; + xmlSchematronNewDocParserCtxt; + xmlSchematronNewMemParserCtxt; + xmlSchematronNewParserCtxt; + xmlSchematronNewValidCtxt; + xmlSchematronParse; + xmlSchematronValidateDoc; +}; +LIBXML2_2.6.23 { + global: + htmlDocDumpMemoryFormat; + xmlOutputBufferCreateBuffer; + xmlSaveToBuffer; + xmlSchemaSetParserStructuredErrors; + xmlStreamPushNode; + xmlStreamWantsAnyNode; + xmlTextReaderSchemaValidateCtxt; +}; +LIBXML2_2.6.24 { + global: + __htmlParseContent; + xmlDOMWrapCloneNode; + xmlRelaxNGSetParserStructuredErrors; +}; +LIBXML2_2.6.26 { + global: + xmlXPathContextSetCache; +}; +LIBXML2_2.6.27 { + global: + htmlNewParserCtxt; + xmlPathToURI; + xmlXIncludeProcessFlagsData; + xmlXPathCompiledEvalToBoolean; +}; +LIBXML2_2.6.28 { + global: + __xmlGlobalInitMutexLock; + __xmlGlobalInitMutexUnlock; + xmlTextReaderSetup; +}; +LIBXML2_2.6.31 { + global: + __xmlGlobalInitMutexDestroy; +}; +LIBXML2_2.6.32 { + global: + xmlSchematronSetValidStructuredErrors; +}; diff --git a/libxml2.spec b/libxml2.spec new file mode 100644 index 0000000..7352533 --- /dev/null +++ b/libxml2.spec @@ -0,0 +1,647 @@ +Name: libxml2 +Version: 2.6.32 +Release: alt2.M40.1 +Epoch: 1 + +Summary: The library for manipulating XML files +License: MIT +Group: System/Libraries +Url: http://xmlsoft.org/ + +%def_disable static +%def_enable check + +%define pkgdocdir %_docdir/%name-%version + +Source: libxml2-%version.tar +Patch: libxml2-%version-%release.patch + +Requires: xml-common + +%add_python_compile_exclude %pkgdocdir/python/examples + +# Automatically added by buildreq on Tue Apr 22 2008 +BuildRequires: libbfd-devel python-devel xml-common zlib-devel + +%package devel +Summary: Development environment for building applications manipulating XML files +Group: Development/C +Requires: %name = %epoch:%version-%release +Requires: zlib-devel + +%package devel-static +Summary: Static library for building applications manipulating XML files +Group: Development/C +Requires: %name-devel = %epoch:%version-%release + +%package -n xml-utils +Summary: Various XML utilities +Group: Text tools +Requires: %name = %epoch:%version-%release +Provides: xmllint = %version +Obsoletes: xmllint + +%package -n python-module-%name +Summary: Python bindings for the %name library +Group: Development/Python +Provides: libxml2-python +Obsoletes: libxml2-python +Requires: %name = %epoch:%version-%release +Provides: python-modules-%name = %epoch:%version-%release +Obsoletes: python-modules-%name < %epoch:%version-%release + +%package doc +Summary: Documentation for the %name library +Group: Development/C + +%description +This library allows to manipulate XML files. It includes support +to read, modify and write XML and HTML files. There is DTDs support +this includes parsing and validation even with complex DtDs, either +at parse time or later once the document has been modified. The output +can be a simple SAX stream or and in-memory DOM like representations. +In this case one can use the built-in XPath and XPointer implementation +to select subnodes or ranges. A flexible Input/Output mechanism is +available, with existing HTTP and FTP modules and combined to an +URI library. + +This package contains the shared library required to run +applications manipulating XML files. + +%description devel +This library allows to manipulate XML files. It includes support +to read, modify and write XML and HTML files. There is DTDs support +this includes parsing and validation even with complex DtDs, either +at parse time or later once the document has been modified. The output +can be a simple SAX stream or and in-memory DOM like representations. +In this case one can use the built-in XPath and XPointer implementation +to select subnodes or ranges. A flexible Input/Output mechanism is +available, with existing HTTP and FTP modules and combined to an +URI library. + +This package contains the libraries, include and other files +you can use to develop applications manipulating XML files. + +%description devel-static +This library allows to manipulate XML files. It includes support +to read, modify and write XML and HTML files. There is DTDs support +this includes parsing and validation even with complex DtDs, either +at parse time or later once the document has been modified. The output +can be a simple SAX stream or and in-memory DOM like representations. +In this case one can use the built-in XPath and XPointer implementation +to select subnodes or ranges. A flexible Input/Output mechanism is +available, with existing HTTP and FTP modules and combined to an +URI library. + +This package contains the static library you can use to develop +statically linked applications manipulating XML files. + +%description -n xml-utils +This package contains xml tools: ++ xmllint - utility for parsing and validating XML files; ++ xmlcatalog - command line tool to parse and manipulate XML or SGML catalog files. + +%description -n python-module-%name +This package contains a module that permits applications +written in the Python programming language to use the interface +supplied by the %name library to manipulate XML files. + +This library allows to manipulate XML files. It includes support +to read, modify and write XML and HTML files. There is DTDs support +this includes parsing and validation even with complex DTDs, either +at parse time or later once the document has been modified. + +%description doc +This package contains documentation on the XML C library. + +%prep +%setup -q -n libxml2-%version +%patch -p1 + +%build +autoreconf -isfv +%configure \ + --disable-dependency-tracking \ + --with-python \ + --with-html-dir=%_docdir \ + --with-html-subdir=%name-%version \ + %{subst_enable static} + +# SMP-incompatible. +%make +%{?!_without_check:%{?!_disable_check:%make check}} + +%install +%make_install install DESTDIR=%buildroot + +mv %buildroot%_datadir/aclocal/libxml{,2}.m4 + +install -p -m644 AUTHORS Copyright NEWS README %buildroot%pkgdocdir/ +install -p -m644 doc/*.html %buildroot%pkgdocdir/ + +%post -p %post_ldconfig +%postun -p %postun_ldconfig + +%files +%_libdir/*.so.* +%dir %pkgdocdir +%pkgdocdir/AUTHORS +%pkgdocdir/Copyright +%pkgdocdir/NEWS +%pkgdocdir/README + +%files -n xml-utils +%_bindir/xmllint +%_bindir/xmlcatalog +%_man1dir/xmllint.* +%_man1dir/xmlcatalog.* + +%files devel +%_bindir/*-config +%_libdir/*.so +%_libdir/*.sh +%_includedir/* +%_libdir/pkgconfig/* +%_datadir/aclocal/* +%_man1dir/*-config* +%_man3dir/* + +%if_enabled static +%files devel-static +%_libdir/*.a +%endif #enabled static + +%files -n python-module-%name +%python_sitelibdir/* +%dir %pkgdocdir +%dir %pkgdocdir/python +%pkgdocdir/python/TODO +%pkgdocdir/python/examples + +%files doc +%dir %pkgdocdir +%pkgdocdir/*.html +%pkgdocdir/*.gif +%pkgdocdir/*.png +%pkgdocdir/*.xml +%pkgdocdir/*.xsl +%pkgdocdir/*.c +%pkgdocdir/*.res +%pkgdocdir/html +%pkgdocdir/examples +%pkgdocdir/tutorial +%doc %_datadir/gtk-doc/html/libxml2/ + +%changelog +* Fri Sep 12 2008 Alexey Tourbin 1:2.6.32-alt2.M40.1 +- rebuild for branch 4.0 + +* Mon Sep 01 2008 Alexey Tourbin 1:2.6.32-alt3 +- upstream update for CVE-2008-3281 to avoid ABI issues + +* Thu Aug 21 2008 Alexey Tourbin 1:2.6.32-alt2 +- applied upstream fix for recursive evaluation of entities (CVE-2008-3281) + +* Tue Apr 22 2008 Alexey Tourbin 1:2.6.32-alt1 +- 2.6.31 -> 2.6.32 + +* Sat Feb 09 2008 Grigory Batalov 1:2.6.31-alt1.1 +- Rebuilt with python-2.5. + +* Mon Jan 14 2008 Alexey Tourbin 1:2.6.31-alt1 +- 2.6.30+svn3661 -> 2.6.31 (fixes CVE-2007-6284) + +* Fri Oct 26 2007 Alexey Tourbin 1:2.6.30-alt2 +- 2.6.30+svn3659 -> 2.6.30+svn3661 (20071016) +- python-module-libxml2: removed manual dependency on python + +* Tue Oct 02 2007 Alexey Tourbin 1:2.6.30-alt1 +- 2.6.29+svn3647 -> 2.6.30+svn3659 (20070904) + +* Sun Aug 05 2007 Alexey Tourbin 1:2.6.29-alt2 +- 2.6.29+svn3644 -> 2.6.29+svn3647 (20070801) +- enabled 'make check' by default, except for W3C XML Schema tests + +* Thu Jul 19 2007 Alexey Tourbin 1:2.6.29-alt1 +- updated to svn revision 3644 (20070718) +- changed src.rpm packaging to keep separate tarball with svn snapshot + +* Thu Apr 19 2007 Alexey Tourbin 1:2.6.28-alt1 +- updated to 2.6.28 release +- linked libxml2mod.so python module with libpython + +* Sun Mar 18 2007 Alexey Tourbin 1:2.6.27-alt4 +- updated to svn revision 3591 (20070314) +- renamed python-modules-libxml2 package to python-module-libxml2, + to match python policy + +* Tue Feb 20 2007 Alexey Tourbin 1:2.6.27-alt3 +- updated to svn revision 3586 (20070216) + +* Sun Jan 07 2007 Alexey Tourbin 1:2.6.27-alt2 +- updated to 20061214 cvs snapshot + +* Mon Oct 30 2006 Alexey Tourbin 1:2.6.27-alt1 +- 2.6.26 -> 2.6.27+ +- imported cvs sources into git and built with gear +- introduced symbol versioning for the shared library, starting with + 2.6.13 release (LIBXML2_2.6.13, LIBXML2_2.6.14, ..., LIBXML2_2.6.27) +- removed libxml.so.2 provides and symlink +- ChangeLog not packaged, NEWS is just good enough + +* Sun Jun 11 2006 Mikhail Zabaluev 1:2.6.26-alt2 +- Patch2: unescape file URIs for I/O, leave others intact + +* Thu Jun 08 2006 Mikhail Zabaluev 1:2.6.26-alt1 +- Release 2.6.26 +- Patch1: in libxml-2.0.pc, move internally used libraries to Libs.private + (bug 9448) +- Patch2 has gone upstream + +* Thu Jun 01 2006 Mikhail Zabaluev 1:2.6.24-alt1 +- Release 2.6.24 +- Patch1 went upstream +- Patch2: fix a typo in configure + +* Tue Apr 18 2006 Mikhail Zabaluev 1:2.6.23-alt2 +- Patch1: honor --nonet when --postvalid is given (GNOME bug 337483) + +* Thu Feb 02 2006 ALT QA Team Robot 1:2.6.23-alt1.1 +- Rebuilt for new pkg-config dependencies. + +* Sun Jan 08 2006 Mikhail Zabaluev 1:2.6.23-alt1 +- 2.6.23 + +* Thu Sep 15 2005 Mikhail Zabaluev 1:2.6.22-alt1 +- 2.6.22 +- Added gtk-doc files to the doc package +- buildreq + +* Mon Sep 05 2005 Mikhail Zabaluev 1:2.6.21-alt1 +- New upstream release + +* Tue Jul 12 2005 Mikhail Zabaluev 1:2.6.20-alt1 +- New upstream release + +* Tue Apr 05 2005 Mikhail Zabaluev 1:2.6.19-alt1 +- New upstream release + +* Mon Mar 14 2005 Mikhail Zabaluev 1:2.6.18-alt1 +- New upstream release +- Built with new Python + +* Mon Jan 17 2005 Mikhail Zabaluev 1:2.6.17-alt1 +- New upstream release + +* Thu Dec 16 2004 Mikhail Zabaluev 1:2.6.16-alt2 +- Fixed docs install +- Patch0 considered harmful + +* Thu Nov 11 2004 Mikhail Zabaluev 1:2.6.16-alt1 +- New upstream release + +* Sun Oct 31 2004 Mikhail Zabaluev 1:2.6.15-alt1 +- New upstream release +- Patch1 is obsolete + +* Wed Oct 27 2004 Mikhail Zabaluev 1:2.6.14-alt2 +- Fixes for buffer overflows from SuSE, provided by LDV [Patch1] + +* Fri Oct 01 2004 Mikhail Zabaluev 1:2.6.14-alt1 +- New upstream release + +* Mon Sep 20 2004 Mikhail Zabaluev 1:2.6.13-alt1 +- New upstream release + +* Tue Aug 24 2004 Mikhail Zabaluev 1:2.6.12-alt1 +- New upstream release +- Grouped xml-utils under 'Text tools' + +* Thu Jul 15 2004 Mikhail Zabaluev 1:2.6.11-alt2 +- Python package renamed to comply with the New Policy + +* Thu Jul 08 2004 Mikhail Zabaluev 1:2.6.11-alt1 +- New upstream release + +* Mon Apr 19 2004 Mikhail Zabaluev 1:2.6.9-alt1 +- New upstream release + +* Sun Mar 28 2004 Mikhail Zabaluev 1:2.6.8-alt1 +- New upstream release + +* Tue Feb 24 2004 Mikhail Zabaluev 1:2.6.7-alt1 +- New upstream release + +* Fri Feb 13 2004 Mikhail Zabaluev 1:2.6.6-alt1 +- New upstream release +- Patch1 gone upstream + +* Wed Feb 04 2004 Mikhail Zabaluev 1:2.6.5-alt2 +- Patch from CVS to prevent an XInclude-related crash in the XML::LibXML + test suite and elsewhere (GNOME bug #133106) [Patch1] + +* Tue Jan 27 2004 Mikhail Zabaluev 1:2.6.5-alt1 +- New upstream release +- Patch1 gone upstream +- Disable check because test target is broken + +* Wed Jan 21 2004 Mikhail Zabaluev 1:2.6.4-alt3 +- Buildreq against Python 2.3 + +* Thu Jan 01 2004 Mikhail Zabaluev 1:2.6.4-alt2 +- Fix XInclude bugs [Patch1] +- buildreq + +* Wed Dec 31 2003 Mikhail Zabaluev 1:2.6.4-alt1 +- New upstream release +- Patch1 gone upstream +- Happy New Year :) + +* Thu Dec 25 2003 Mikhail Zabaluev 1:2.6.3-alt2 +- CVS patch to fix an XInclude problem (GNOME bug #129932) [Patch1] + +* Thu Dec 11 2003 Mikhail Zabaluev 1:2.6.3-alt1 +- New upstream release +- Patch1 is obsolete +- Patch2 gone upstream + +* Thu Dec 11 2003 Mikhail Zabaluev 1:2.6.2-alt3 +- Bugfix from CVS for Gnome Bugzilla bug #126817 [Patch2] + +* Thu Nov 27 2003 Alexey Tourbin 1:2.6.2-alt2 +- Do not package .la files. + +* Mon Nov 10 2003 Mikhail Zabaluev 1:2.6.2-alt1 +- Updated to 2.6.2 +- Make the tests pass [Patch1] + +* Tue Sep 16 2003 Mikhail Zabaluev 1:2.5.11-alt1 +- Upstream release 2.5.11 + +* Mon Aug 18 2003 Mikhail Zabaluev 1:2.5.10-alt1 +- New version +- Eliminated duplication of doc files + +* Sat Jul 12 2003 Mikhail Zabaluev 1:2.5.8-alt1 +- New version + +* Sat Jun 21 2003 Mikhail Zabaluev 1:2.5.7-alt2 +- Fixed up the anachronistic aclocal m4 file, by request from Alexey Morozov. + Renamed the file libxml2.m4 + +* Mon May 05 2003 Mikhail Zabaluev 1:2.5.7-alt1 +- New version + +* Fri Apr 04 2003 Mikhail Zabaluev 1:2.5.6-alt1 +- 2.5.6 + +* Fri Jan 17 2003 Mikhail Zabaluev 1:2.5.1-alt1 +- Updated to 2.5.1 +- Manpage patch gone upstream + +* Fri Dec 13 2002 Dmitry V. Levin 1:2.4.30-alt1 +- Updated to 2.4.30 + +* Thu Dec 05 2002 Dmitry V. Levin 1:2.4.28-alt2 +- Applied cvs patch from Marcus Clarke fixing a problem in entities + parsing that was detected in KDe documentations environment. + +* Sat Nov 30 2002 Mikhail Zabaluev 1:2.4.28-alt1 +- 2.4.28 +- doc subpackage + +* Thu Nov 21 2002 Dmitry V. Levin 1:2.4.27-alt1 +- 2.4.27 +- Added dependence on xml-common. + +* Sun Nov 03 2002 Mikhail Zabaluev 1:2.4.26-alt0.1 +- 2.4.26, I hope it will behave now +- disable static build by default + +* Wed Oct 09 2002 Stanislav Ievlev 1:2.4.24-alt2 +- increase release to satisfy rpm + (rpm ignore serial if version and release of old and new package a same) + +* Wed Oct 09 2002 Stanislav Ievlev 1:2.4.24-alt1 +- rollback to 2.4.24: new version is too buggy. + +* Mon Oct 07 2002 Dmitry V. Levin 2.4.25-alt1 +- 2.4.25 +- Fixed doc installation. + +* Thu Sep 12 2002 Mikhail Zabaluev 2.4.24-alt1 +- 2.4.24 + +* Mon Jul 22 2002 Mikhail Zabaluev 2.4.23-alt1 +- 2.4.23 +- Fixed doc installation + +* Sat Jun 08 2002 Mikhail Zabaluev 2.4.22-alt1 +- 2.4.22 + +* Sat May 04 2002 Mikhail Zabaluev 2.4.21-alt1 +- 2.4.21 +- Fixed BuildRequires +- postun_ldconfig + +* Sat Apr 27 2002 Dmitry V. Levin 2.4.20-alt1 +- 2.4.20 + +* Tue Mar 19 2002 Dmitry V. Levin 2.4.18-alt1 +- 2.4.18. +- Repackaged docs. + +* Wed Feb 20 2002 Dmitry V. Levin 2.4.16-alt1 +- 2.4.16. + +* Tue Feb 12 2002 Dmitry V. Levin 2.4.15-alt1 +- 2.4.15. + +* Mon Feb 11 2002 Dmitry V. Levin 2.4.14-alt1 +- 2.4.14. +- Added python subpackage. + +* Wed Jan 16 2002 Dmitry V. Levin 2.4.13-alt1 +- 2.4.13 + +* Tue Nov 27 2001 Dmitry V. Levin 2.4.11-alt1 +- 2.4.11 + +* Mon Nov 12 2001 Dmitry V. Levin 2.4.10-alt1 +- 2.4.10 + +* Tue Nov 06 2001 Dmitry V. Levin 2.4.8-alt1 +- 2.4.8 +- Renamed xmllint subpackage to xml-utils. + +* Mon Nov 05 2001 Dmitry V. Levin 2.4.7-alt1 +- 2.4.7 +- Packaged xmlcatalog. +- Packaged %_libdir/pkgconfig/* files. + +* Fri Oct 12 2001 Dmitry V. Levin 2.4.6-alt1 +- 2.4.6 + +* Mon Sep 24 2001 Dmitry V. Levin 2.4.5-alt1 +- 2.4.5 + +* Thu Sep 13 2001 Dmitry V. Levin 2.4.4-alt1 +- 2.4.4 + +* Mon Aug 27 2001 Dmitry V. Levin 2.4.3-alt1 +- 2.4.3 + +* Fri Aug 17 2001 Dmitry V. Levin 2.4.2-alt2 +- Rebuilt. + +* Thu Aug 16 2001 Dmitry V. Levin 2.4.2-alt1 +- 2.4.2 + +* Thu Jul 26 2001 Dmitry V. Levin 2.4.1-alt1 +- 2.4.1 + +* Wed Jul 11 2001 Dmitry V. Levin 2.4.0-alt1 +- 2.4.0 + +* Thu Jul 05 2001 Dmitry V. Levin 2.3.13-alt1 +- 2.3.13 + +* Mon Jun 18 2001 Dmitry V. Levin 2.3.11-alt1 +- 2.3.11 + +* Mon Jun 04 2001 Dmitry V. Levin 2.3.10-alt1 +- 2.3.10 + +* Tue May 22 2001 Dmitry V. Levin 2.3.9-alt1 +- 2.3.9 +- Moved static library to devel-static subpackage. + +* Sat May 05 2001 Rider 2.3.8-alt1 +- 2.3.8 + +* Tue Mar 27 2001 Dmitry V. Levin 2.3.5-alt1 +- 2.3.5 + +* Sun Mar 11 2001 Dmitry V. Levin 2.3.4-ipl1mdk +- 2.3.4 + +* Sun Mar 04 2001 Dmitry V. Levin 2.3.3-ipl1mdk +- 2.3.3 + +* Mon Feb 26 2001 Dmitry V. Levin 2.3.2-ipl1mdk +- 2.3.2 + +* Sat Feb 17 2001 Dmitry V. Levin 2.3.1-ipl1mdk +- 2.3.1 + +* Sun Feb 11 2001 Dmitry V. Levin 2.3.0-ipl2mdk +- Provides libxml.so.2 for compatibility. + +* Fri Feb 09 2001 Dmitry V. Levin 2.3.0-ipl1mdk +- 2.3.0 +- Removed "Conflicts: libxml-devel" tag from %name-devel package. + +* Sat Jan 27 2001 Dmitry V. Levin 2.2.12-ipl1mdk +- 2.2.12 + +* Sun Jan 07 2001 Dmitry V. Levin 2.8.11-ipl3mdk +- 2.8.11 +- Moved xmllint to separate subpackage. +- Specfile cleanup; updated URL, summaries and descriptions. +- Added libxml.m4 and manpages. +- Relocated html documentation. + +* Wed Nov 29 2000 AEN +- build for RE + +* Tue Nov 14 2000 Geoffrey Lee 2.2.8-1mdk +- bump up the version. + +* Fri Nov 03 2000 Geoffrey Lee 2.2.7-1mdk +- new and shiny version. + +* Sun Oct 29 2000 Geoffrey Lee 2.2.6-1mdk +- shiny version. + +* Sun Oct 15 2000 Geoffrey Lee 2.2.4-1mdk +- very new and shiny version. + +* Sat Aug 26 2000 Yoann Vandoorselaere 2.2.2-2mdk +- corrected bug reported by + Reinhard Katzmann : + Requires : %name = {PACKAGE_VERSION} + +* Tue Aug 22 2000 Yoann Vandoorselaere 2.2.2-1mdk +- updated to libxml version 2.2.2 + +* Mon Aug 07 2000 Frederic Lepied 1.8.9-3mdk +- automatically added BuildRequires + +* Fri Jul 28 2000 Geoffrey Lee 1.8.9-2mdk +- rebuild + +* Sat Jul 22 2000 Geoffrey Lee 1.8.9-1mdk +- new version +- big move + +* Thu Jul 6 2000 dam's 1.8.8-4mdk +- spec cleanup. + +* Thu Jul 06 2000 Geoffrey Lee 1.8.8-3mdk +- use some macros + +* Tue Jul 4 2000 dam's 1.8.8-2mdk +- moved xml-config to devel package. Thanx to Stefan + +* Tue Jul 4 2000 dam's 1.8.8-1mdk +- updated. +- spec cleanup. + +* Tue Apr 18 2000 Lenny Cartier 1.8.7-1mdk +- fix release tag + +* Sun Apr 16 2000 Daouda Lo 1.8.7-1mdk +- release from helix stuffs. + +* Wed Mar 22 2000 Lenny Cartier 1.8.6-2mdk +- fix group + +* Sun Feb 20 2000 Axalon Bloodstone 1.8.6-1mdk +- 1.8.6 + +* Sun Oct 31 1999 Axalon Bloodstone +- SMP build/check +- 1.7.3 + +* Fri Sep 24 1999 Axalon Bloodstone +- 1.7.1 + +* Thu Jul 22 1999 Chmouel Boudjnah +- 1.4. + +* Wed Jun 30 1999 Chmouel Boudjnah +- 1.2.0. + +* Tue May 11 1999 Bernhard Rosenkränzer +- Mandrake adaptions + +* Thu Mar 04 1999 Michael Fulbright +- version 1.0.0 + +* Fri Feb 12 1999 Michael Fulbright +- version 0.99.5 built against gnome-libs-0.99.8 + +* Wed Feb 03 1999 Michael Fulbright +- version 0.99.5 + +* Wed Jan 06 1999 Michael Fulbright +- made clean section work again + +* Wed Dec 16 1998 Michael Fulbright +- bumped to 0.99.0 for GNOME freeze + +* Sun Oct 4 1998 Daniel Veillard +- Added xml-config to the package + +* Thu Sep 24 1998 Michael Fulbright +- Built release 0.30 diff --git a/parser.c b/parser.c index f20fd05..5577795 100644 --- a/parser.c +++ b/parser.c @@ -2344,7 +2344,7 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len, return(NULL); last = str + len; - if (ctxt->depth > 40) { + if ((ctxt->depth > 40) || (ctxt->nbentities >= 500000)) { xmlFatalErr(ctxt, XML_ERR_ENTITY_LOOP, NULL); return(NULL); } @@ -2382,6 +2382,11 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len, "String decoding Entity Reference: %.30s\n", str); ent = xmlParseStringEntityRef(ctxt, &str); + if (ctxt->lastError.code == XML_ERR_ENTITY_LOOP) + goto int_error; + ctxt->nbentities++; + if (ent != NULL) + ctxt->nbentities += ent->checked; if ((ent != NULL) && (ent->etype == XML_INTERNAL_PREDEFINED_ENTITY)) { if (ent->content != NULL) { @@ -2427,6 +2432,11 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len, xmlGenericError(xmlGenericErrorContext, "String decoding PE Reference: %.30s\n", str); ent = xmlParseStringPEReference(ctxt, &str); + if (ctxt->lastError.code == XML_ERR_ENTITY_LOOP) + goto int_error; + ctxt->nbentities++; + if (ent != NULL) + ctxt->nbentities += ent->checked; if (ent != NULL) { if (ent->content == NULL) { if (xmlLoadEntityContent(ctxt, ent) < 0) { @@ -2466,6 +2476,7 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len, mem_error: xmlErrMemory(ctxt, NULL); +int_error: if (rep != NULL) xmlFree(rep); if (buffer != NULL) @@ -3280,6 +3291,9 @@ xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) { } } else { ent = xmlParseEntityRef(ctxt); + ctxt->nbentities++; + if (ent != NULL) + ctxt->nbentities += ent->checked; if ((ent != NULL) && (ent->etype == XML_INTERNAL_PREDEFINED_ENTITY)) { if (len > buf_size - 10) { @@ -4566,6 +4580,7 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) { int isParameter = 0; xmlChar *orig = NULL; int skipped; + unsigned long oldnbent = ctxt->nbentities; /* GROW; done in the caller */ if (CMP8(CUR_PTR, '<', '!', 'E', 'N', 'T', 'I', 'T', 'Y')) { @@ -4783,6 +4798,7 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) { } } if (cur != NULL) { + cur->checked = ctxt->nbentities - oldnbent; if (cur->orig != NULL) xmlFree(orig); else @@ -6189,6 +6205,11 @@ xmlParseReference(xmlParserCtxtPtr ctxt) { if (ent == NULL) return; if (!ctxt->wellFormed) return; + ctxt->nbentities++; + if (ctxt->nbentities >= 500000) { + xmlFatalErr(ctxt, XML_ERR_ENTITY_LOOP, NULL); + return; + } was_checked = ent->checked; if ((ent->name != NULL) && (ent->etype != XML_INTERNAL_PREDEFINED_ENTITY)) { @@ -6249,6 +6270,7 @@ xmlParseReference(xmlParserCtxtPtr ctxt) { xmlFreeNodeList(list); } } else { + unsigned long oldnbent = ctxt->nbentities; /* * 4.3.2: An internal general parsed entity is well-formed * if its replacement text matches the production labeled @@ -6271,6 +6293,7 @@ xmlParseReference(xmlParserCtxtPtr ctxt) { ret = xmlParseBalancedChunkMemoryInternal(ctxt, value, user_data, &list); ctxt->depth--; + } else if (ent->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY) { ctxt->depth++; @@ -6283,6 +6306,7 @@ xmlParseReference(xmlParserCtxtPtr ctxt) { xmlErrMsgStr(ctxt, XML_ERR_INTERNAL_ERROR, "invalid entity type found\n", NULL); } + ent->checked = ctxt->nbentities - oldnbent; if (ret == XML_ERR_ENTITY_LOOP) { xmlFatalErr(ctxt, XML_ERR_ENTITY_LOOP, NULL); return; @@ -6339,8 +6363,10 @@ xmlParseReference(xmlParserCtxtPtr ctxt) { list = NULL; } } - ent->checked = 1; + if (ent->checked == 0) + ent->checked = 1; } + ctxt->nbentities += ent->checked; if (ent->children == NULL) { /* @@ -6349,7 +6375,7 @@ xmlParseReference(xmlParserCtxtPtr ctxt) { * though parsing for first checking go though the entity * content to generate callbacks associated to the entity */ - if (was_checked == 1) { + if (was_checked != 0) { void *user_data; /* * This is a bit hackish but this seems the best @@ -11480,7 +11506,7 @@ xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx, const xmlChar *URL, if (ctx == NULL) return(-1); - if (ctx->depth > 40) { + if ((ctx->depth > 40) || (ctx->nbentities >= 500000)) { return(XML_ERR_ENTITY_LOOP); } @@ -11681,7 +11707,8 @@ xmlParseExternalEntityPrivate(xmlDocPtr doc, xmlParserCtxtPtr oldctxt, xmlChar start[4]; xmlCharEncoding enc; - if (depth > 40) { + if ((depth > 40) || + ((oldctxt != NULL) && (oldctxt->nbentities >= 500000))) { return(XML_ERR_ENTITY_LOOP); } @@ -11824,6 +11851,7 @@ xmlParseExternalEntityPrivate(xmlDocPtr doc, xmlParserCtxtPtr oldctxt, oldctxt->node_seq.maximum = ctxt->node_seq.maximum; oldctxt->node_seq.length = ctxt->node_seq.length; oldctxt->node_seq.buffer = ctxt->node_seq.buffer; + oldctxt->nbentities += ctxt->nbentities; ctxt->node_seq.maximum = 0; ctxt->node_seq.length = 0; ctxt->node_seq.buffer = NULL; @@ -11924,7 +11952,7 @@ xmlParseBalancedChunkMemoryInternal(xmlParserCtxtPtr oldctxt, int size; xmlParserErrors ret = XML_ERR_OK; - if (oldctxt->depth > 40) { + if ((oldctxt->depth > 40) || (oldctxt->nbentities >= 500000)) { return(XML_ERR_ENTITY_LOOP); } @@ -12048,6 +12076,7 @@ xmlParseBalancedChunkMemoryInternal(xmlParserCtxtPtr oldctxt, ctxt->myDoc->last = last; } + oldctxt->nbentities += ctxt->nbentities; ctxt->sax = oldsax; ctxt->dict = NULL; ctxt->attsDefault = NULL; @@ -13363,6 +13392,7 @@ xmlCtxtReset(xmlParserCtxtPtr ctxt) ctxt->depth = 0; ctxt->charset = XML_CHAR_ENCODING_UTF8; ctxt->catalogs = NULL; + ctxt->nbentities = 0; xmlInitNodeInfoSeq(&ctxt->node_seq); if (ctxt->attsDefault != NULL) { diff --git a/parserInternals.c b/parserInternals.c index d7aa4cf..b58b661 100644 --- a/parserInternals.c +++ b/parserInternals.c @@ -1669,6 +1669,7 @@ xmlInitParserCtxt(xmlParserCtxtPtr ctxt) ctxt->depth = 0; ctxt->charset = XML_CHAR_ENCODING_UTF8; ctxt->catalogs = NULL; + ctxt->nbentities = 0; xmlInitNodeInfoSeq(&ctxt->node_seq); return(0); } diff --git a/python/Makefile.am b/python/Makefile.am index 23898fa..3023df5 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -9,7 +9,7 @@ INCLUDES = \ -I$(top_builddir)/include \ -I$(top_builddir)/$(subdir) -docsdir = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION) +docsdir = @HTML_DIR@/python # libxml2class.txt is generated dist_docs_DATA = TODO @@ -31,7 +31,7 @@ python_LTLIBRARIES = libxml2mod.la libxml2mod_la_SOURCES = libxml.c types.c nodist_libxml2mod_la_SOURCES = libxml2-py.c -libxml2mod_la_LIBADD = $(mylibs) @CYGWIN_EXTRA_PYTHON_LIBADD@ +libxml2mod_la_LIBADD = $(mylibs) @CYGWIN_EXTRA_PYTHON_LIBADD@ -lpython@PYTHON_VERSION@ libxml.c: libxml2-py.h # to generate before to compile diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am index 8a85075..5ca08ba 100644 --- a/python/tests/Makefile.am +++ b/python/tests/Makefile.am @@ -1,4 +1,4 @@ -exampledir = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION)/examples +exampledir = @HTML_DIR@/python/examples dist_example_DATA = $(PYTESTS) $(XMLS) PYTESTS= \ diff --git a/xstc/Makefile.am b/xstc/Makefile.am index 966a8de..b6e5c6f 100644 --- a/xstc/Makefile.am +++ b/xstc/Makefile.am @@ -14,6 +14,8 @@ MSTESTDEF=MSXMLSchema1-0-20020116.testSet SUNTESTDEF=SunXMLSchema1-0-20020116.testSet NISTTESTDEF=NISTXMLSchema1-0-20020116.testSet NISTTESTDEF_2=NISTXMLSchemaDatatypes.testSet +WGET=/usr/bin/wget +XSLTPROC=/usr/bin/xsltproc # # The local data and scripts