summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Hommey <glandium@debian.org>2008-01-19 18:06:56 +0100
committerMike Hommey <glandium@debian.org>2008-01-19 18:06:56 +0100
commit324dc16298379e59c80ce31bd1777a77b8144770 (patch)
tree9b4f80c940c3b68923649f17c20d32244c420c72
parent63252ff03fb2321af6ec7451ba7ad6d49e7bed9a (diff)
parentfc760252aba4054a612dd20b803d0c7c19713064 (diff)
downloadlibxml2-324dc16298379e59c80ce31bd1777a77b8144770.tar.gz
New upstream release
-rw-r--r--ChangeLog107
-rw-r--r--HTMLparser.c11
-rw-r--r--Makefile.am19
-rw-r--r--Makefile.in28
-rw-r--r--NEWS33
-rw-r--r--aclocal.m42
-rwxr-xr-xcheck-relaxng-test-suite.py2
-rwxr-xr-xcheck-relaxng-test-suite2.py2
-rwxr-xr-xcheck-xsddata-test-suite.py2
-rwxr-xr-xconfigure2
-rw-r--r--configure.in2
-rw-r--r--doc/devhelp/libxml2-valid.html2
-rw-r--r--doc/examples/Makefile.am1
-rw-r--r--doc/examples/Makefile.in1
-rw-r--r--doc/libxml2-api.xml10
-rw-r--r--doc/libxml2.xsa37
-rw-r--r--doc/news.html19
-rw-r--r--doc/xml.html20
-rw-r--r--globals.c1
-rw-r--r--hash.c15
-rw-r--r--include/libxml/xmlversion.h8
-rw-r--r--libxml.h1
-rw-r--r--libxml2.spec6
-rw-r--r--ltmain.sh2
-rw-r--r--nanohttp.c9
-rw-r--r--parser.c51
-rw-r--r--parserInternals.c2
-rw-r--r--pattern.c2
-rw-r--r--python/Makefile.am6
-rw-r--r--python/Makefile.in12
-rw-r--r--python/libxml2-py.c32
-rwxr-xr-xpython/setup.py2
-rw-r--r--python/tests/Makefile.am4
-rw-r--r--python/tests/Makefile.in8
-rw-r--r--schematron.c3
-rw-r--r--testURI.c19
-rw-r--r--threads.c21
-rw-r--r--xml2-config.in2
-rw-r--r--xmllint.c2
-rw-r--r--xmlmemory.c3
-rw-r--r--xmlregexp.c29
-rw-r--r--xmlsave.c4
-rw-r--r--xmlwriter.c5
43 files changed, 448 insertions, 101 deletions
diff --git a/ChangeLog b/ChangeLog
index b3481f4..bacb7a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,110 @@
+Fri Jan 11 08:58:49 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: avoid a warning on 64bits introduced earlier
+ * parserInternals.c: make more checking on the UTF-8 input
+
+Fri Jan 11 15:37:05 CST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: avoid stopping parsing when encountering
+ out of range characters in an HTML file, report and
+ continue processing instead, should fix #472696
+
+Fri Jan 11 15:13:35 CST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * check-relaxng-test-suite2.py check-relaxng-test-suite.py
+ Makefile.am python/tests/Makefile.am python/Makefile.am
+ check-xsddata-test-suite.py: patches from John Carr to
+ start cleaning up 'make diskcheck' problems c.f. #506228
+
+Fri Jan 11 14:48:40 CST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: apply fix from Stefan Kost to avoid a crash
+ in xmllint, fixes 504284
+
+Fri Jan 11 14:39:03 CST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * xml2-config.in: apply patch from Fred Crozat to avoid
+ outputting -L/usr/lib from xml2-config, fixes #497012
+
+Fri Jan 11 14:18:09 CST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: fix definition for <embed> to avoid error
+ when saving back, patch from Stefan Behnel fixing 495213
+
+Fri Jan 11 14:06:09 CST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: applied patch from Christian Schmidt fixing a
+ column counter update problem, fixes #472696
+
+Fri Jan 11 13:22:14 CST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: handle a erroneous parsing of attributes in
+ case said attribute has been redeclared in the DTD with a
+ different type
+ * hash.c: fix the hash scanner to not crash if a first element
+ from the hash list is been removed in the callback
+
+Wed Jan 9 10:15:50 CST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * xmlwriter.c: fix indentation in xmlTextWriterFullEndElement,
+ as raised by Felipe Pena, should fix #508156
+
+Tue Dec 6 11:07:42 CET 2007 Rob Richards <rrichards@ctindustries.net>
+
+ * pattern.c: fix crash from double free of name for bug #501760
+
+Fri Nov 23 11:47:48 CET 2007 Daniel Veillard <daniel@veillard.com>
+
+ * threads.c: remove unused variable in __xmlGlobalInitMutexLock
+ reported by Hannes Eder
+
+Mon Nov 19 18:39:26 CET 2007 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c: remove a cut-and-paste copy error
+
+Fri Nov 16 11:55:36 CET 2007 Rob Richards <rrichards@ctindustries.net>
+
+ * globals.c threads.c include/libxml/threads.h:
+ __xmlGlobalInitMutexDestroy() will free global_init_lock on Win32.
+ Patch from Marc-Antoine Ruel.
+
+Tue Nov 13 21:26:27 CET 2007 Rob Richards <rrichards@ctindustries.net>
+
+ * schematron.c: fix crash/leaks from xmlSchematronParse due to improper
+ schema document ownership for bug #495215
+
+Tue Oct 30 21:24:55 CET 2007 Daniel Veillard <daniel@veillard.com>
+
+ * xmlmemory.c: xmlFree(NULL) should not crash in debug mode
+ should fix #491651
+
+Tue Oct 16 13:58:41 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * testURI.c: add a debug option printing all the fields within
+ the parsed URI structure
+
+Wed Oct 10 10:25:52 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * xmlsave.c: fix to avoid a crash when dumping an attribute from
+ an XHTML document, patch contributed to fix #485298
+
+Tue Aug 28 19:32:28 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c: another nasty regexp case fixed.
+ * test/regexp/ranges2 result/regexp/ranges2: added to regression
+ suite
+
+Fri Aug 24 10:58:58 HKT 2007 William Brack <wbrack@mmm.com.hk>
+
+ * nanohttp.c: Enhanced to include port number (if not == 80) on the
+ "Header:" URL (bug #469681).
+ * xmlregexp.c: Fixed a typo causing a warning message.
+
+Thu Aug 23 22:48:20 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * nanohttp.c: fix an open() call with creation without 3rd argument
+ hopefully that interface is never used.
+
Thu Aug 23 17:00:49 CEST 2007 Daniel Veillard <daniel@veillard.com>
* configure.in doc/*: preparing release of 2.6.30
diff --git a/HTMLparser.c b/HTMLparser.c
index 91d54c7..38af5e3 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -711,7 +711,7 @@ html40ElementTable[] = {
{ "em", 0, 3, 0, 0, 0, 0, 1, "emphasis",
DECL html_inline, NULL, DECL html_attrs, NULL, NULL
},
-{ "embed", 0, 1, 2, 0, 1, 1, 1, "generic embedded object ",
+{ "embed", 0, 1, 0, 0, 1, 1, 1, "generic embedded object ",
EMPTY, NULL, DECL embed_attrs, NULL, NULL
},
{ "fieldset", 0, 0, 0, 0, 0, 0, 0, "form control group ",
@@ -2772,8 +2772,13 @@ htmlParseCharData(htmlParserCtxtPtr ctxt) {
cur = CUR_CHAR(l);
while (((cur != '<') || (ctxt->token == '<')) &&
((cur != '&') || (ctxt->token == '&')) &&
- (IS_CHAR(cur))) {
- COPY_BUF(l,buf,nbchar,cur);
+ (cur != 0)) {
+ if (!(IS_CHAR(cur))) {
+ htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR,
+ "Invalid char in CDATA 0x%X\n", cur);
+ } else {
+ COPY_BUF(l,buf,nbchar,cur);
+ }
if (nbchar >= HTML_PARSER_BIG_BUFFER_SIZE) {
/*
* Ok the segment is to be consumed as chars.
diff --git a/Makefile.am b/Makefile.am
index 155b72b..99aa898 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -856,23 +856,23 @@ Automatatests: testAutomata$(EXEEXT)
rm result.$$name ; \
fi ; fi ; done)
-$(srcdir)/dba100000.xml: dbgenattr.pl
+dba100000.xml: dbgenattr.pl
@echo "## generating dba100000.xml"
- @($(PERL) $(top_srcdir)/dbgenattr.pl 100000 > $(srcdir)/dba100000.xml)
+ @($(PERL) $(top_srcdir)/dbgenattr.pl 100000 > dba100000.xml)
-Timingtests: xmllint$(EXEEXT) $(srcdir)/dba100000.xml
+Timingtests: xmllint$(EXEEXT) dba100000.xml
@echo "## Timing tests to try to detect performance"
@echo "## as well a memory usage breakage when streaming"
@echo "## 1/ using the file interface"
@echo "## 2/ using the memory interface"
@echo "## 3/ repeated DOM parsing"
@echo "## 4/ repeated DOM validation"
- -@($(top_builddir)/xmllint --stream --timing $(srcdir)/dba100000.xml; \
+ -@($(top_builddir)/xmllint --stream --timing dba100000.xml; \
MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\
if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
exit 0)
- -@($(top_builddir)/xmllint --stream --timing --memory $(srcdir)/dba100000.xml; \
+ -@($(top_builddir)/xmllint --stream --timing --memory dba100000.xml; \
MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\
if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
@@ -1177,6 +1177,15 @@ install-data-local:
-@INSTALL@ -m 0644 $(srcdir)/testHTML.c $(DESTDIR)$(EXAMPLES_DIR)
-@INSTALL@ -m 0644 $(srcdir)/testXPath.c $(DESTDIR)$(EXAMPLES_DIR)
+uninstall-local:
+ rm $(DESTDIR)$(EXAMPLES_DIR)/testXPath.c
+ rm $(DESTDIR)$(EXAMPLES_DIR)/testHTML.c
+ rm $(DESTDIR)$(EXAMPLES_DIR)/testSAX.c
+ rm $(DESTDIR)$(EXAMPLES_DIR)/xmllint.c
+ rm -rf $(DESTDIR)$(EXAMPLES_DIR)
+ rm $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)/Copyright
+ rm -rf $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)
+
tst: tst.c
$(CC) $(CFLAGS) -Iinclude -o tst tst.c .libs/libxml2.a -lpthread -lm -lz
diff --git a/Makefile.in b/Makefile.in
index d02fee2..942ec1e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1255,8 +1255,8 @@ ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
uninstall-confexecDATA uninstall-info-am \
- uninstall-libLTLIBRARIES uninstall-m4dataDATA uninstall-man \
- uninstall-pkgconfigDATA
+ uninstall-libLTLIBRARIES uninstall-local uninstall-m4dataDATA \
+ uninstall-man uninstall-pkgconfigDATA
uninstall-info: uninstall-info-recursive
@@ -1283,8 +1283,9 @@ uninstall-man: uninstall-man1 uninstall-man3
pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
uninstall-binPROGRAMS uninstall-binSCRIPTS \
uninstall-confexecDATA uninstall-info-am \
- uninstall-libLTLIBRARIES uninstall-m4dataDATA uninstall-man \
- uninstall-man1 uninstall-man3 uninstall-pkgconfigDATA
+ uninstall-libLTLIBRARIES uninstall-local uninstall-m4dataDATA \
+ uninstall-man uninstall-man1 uninstall-man3 \
+ uninstall-pkgconfigDATA
# that one forces the rebuild when "make rebuild" is run on doc/
@@ -2004,23 +2005,23 @@ Automatatests: testAutomata$(EXEEXT)
rm result.$$name ; \
fi ; fi ; done)
-$(srcdir)/dba100000.xml: dbgenattr.pl
+dba100000.xml: dbgenattr.pl
@echo "## generating dba100000.xml"
- @($(PERL) $(top_srcdir)/dbgenattr.pl 100000 > $(srcdir)/dba100000.xml)
+ @($(PERL) $(top_srcdir)/dbgenattr.pl 100000 > dba100000.xml)
-Timingtests: xmllint$(EXEEXT) $(srcdir)/dba100000.xml
+Timingtests: xmllint$(EXEEXT) dba100000.xml
@echo "## Timing tests to try to detect performance"
@echo "## as well a memory usage breakage when streaming"
@echo "## 1/ using the file interface"
@echo "## 2/ using the memory interface"
@echo "## 3/ repeated DOM parsing"
@echo "## 4/ repeated DOM validation"
- -@($(top_builddir)/xmllint --stream --timing $(srcdir)/dba100000.xml; \
+ -@($(top_builddir)/xmllint --stream --timing dba100000.xml; \
MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\
if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
exit 0)
- -@($(top_builddir)/xmllint --stream --timing --memory $(srcdir)/dba100000.xml; \
+ -@($(top_builddir)/xmllint --stream --timing --memory dba100000.xml; \
MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\
if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
@@ -2290,6 +2291,15 @@ install-data-local:
-@INSTALL@ -m 0644 $(srcdir)/testHTML.c $(DESTDIR)$(EXAMPLES_DIR)
-@INSTALL@ -m 0644 $(srcdir)/testXPath.c $(DESTDIR)$(EXAMPLES_DIR)
+uninstall-local:
+ rm $(DESTDIR)$(EXAMPLES_DIR)/testXPath.c
+ rm $(DESTDIR)$(EXAMPLES_DIR)/testHTML.c
+ rm $(DESTDIR)$(EXAMPLES_DIR)/testSAX.c
+ rm $(DESTDIR)$(EXAMPLES_DIR)/xmllint.c
+ rm -rf $(DESTDIR)$(EXAMPLES_DIR)
+ rm $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)/Copyright
+ rm -rf $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)
+
tst: tst.c
$(CC) $(CFLAGS) -Iinclude -o tst tst.c .libs/libxml2.a -lpthread -lm -lz
diff --git a/NEWS b/NEWS
index d28eb99..bd96196 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,39 @@ ChangeLog.html
to the SVN at
http://svn.gnome.org/viewcvs/libxml2/trunk/
code base.Here is the list of public releases:
+2.6.31: Jan 11 2008:
+ - Security fix: missing of checks in UTF-8 parsing
+ - Bug fixes: regexp bug, dump attribute from XHTML document, fix
+ xmlFree(NULL) to not crash in debug mode, Schematron parsing crash
+ (Rob Richards), global lock free on Windows (Marc-Antoine Ruel),
+ XSD crash due to double free (Rob Richards), indentation fix in
+ xmlTextWriterFullEndElement (Felipe Pena), error in attribute type
+ parsing if attribute redeclared, avoid crash in hash list scanner if
+ deleting elements, column counter bug fix (Christian Schmidt),
+ HTML embed element saving fix (Stefan Behnel), avoid -L/usr/lib
+ output from xml2-config (Fred Crozat), avoid an xmllint crash
+ (Stefan Kost), don't stop HTML parsing on out of range chars.
+
+ - Code cleanup: fix open() call third argument, regexp cut'n paste
+ copy error, unused variable in __xmlGlobalInitMutexLock (Hannes Eder),
+ some make distcheck realted fixes (John Carr)
+ - Improvements: HTTP Header: includes port number (William Brack),
+ testURI --debug option,
+
+
+2.6.30: Aug 23 2007:
+ - Portability: Solaris crash on error handling, windows path fixes
+ (Roland Schwarz and Rob Richards), mingw build (Roland Schwarz)
+ - Bugfixes: xmlXPathNodeSetSort problem (William Brack), leak when
+ reusing a writer for a new document (Dodji Seketeli), Schemas
+ xsi:nil handling patch (Frank Gross), relative URI build problem
+ (Patrik Fimml), crash in xmlDocFormatDump, invalid char in comment
+ detection bug, fix disparity with xmlSAXUserParseMemory, automata
+ generation for complex regexp counts problems, Schemas IDC import
+ problems (Frank Gross), xpath predicate evailation error handling
+ (William Brack)
+
+
2.6.29: Jun 12 2007:
- Portability: patches from Andreas Stricke for WinCEi,
fix compilation warnings (William Brack), avoid warnings on Apple OS/X
diff --git a/aclocal.m4 b/aclocal.m4
index 29995c1..e292064 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -13,7 +13,7 @@
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-# serial 51 Debian 1.5.24-1 AC_PROG_LIBTOOL
+# serial 51 Debian 1.5.24-2 AC_PROG_LIBTOOL
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
diff --git a/check-relaxng-test-suite.py b/check-relaxng-test-suite.py
index e4dc634..f4a5a69 100755
--- a/check-relaxng-test-suite.py
+++ b/check-relaxng-test-suite.py
@@ -16,7 +16,7 @@ quiet = 1
#
# the testsuite description
#
-CONF="test/relaxng/OASIS/spectest.xml"
+CONF=os.path.join(os.path.dirname(__file__), "test/relaxng/OASIS/spectest.xml")
LOG="check-relaxng-test-suite.log"
RES="relaxng-test-results.xml"
diff --git a/check-relaxng-test-suite2.py b/check-relaxng-test-suite2.py
index 1cfd47b..8618db7 100755
--- a/check-relaxng-test-suite2.py
+++ b/check-relaxng-test-suite2.py
@@ -15,7 +15,7 @@ quiet = 1
#
# the testsuite description
#
-CONF="test/relaxng/testsuite.xml"
+CONF=os.path.join(os.path.dirname(__file__), "test/relaxng/testsuite.xml")
LOG="check-relaxng-test-suite2.log"
log = open(LOG, "w")
diff --git a/check-xsddata-test-suite.py b/check-xsddata-test-suite.py
index af6f876..c946129 100755
--- a/check-xsddata-test-suite.py
+++ b/check-xsddata-test-suite.py
@@ -16,7 +16,7 @@ quiet = 1
#
# the testsuite description
#
-CONF="test/xsdtest/xsdtestsuite.xml"
+CONF=os.path.join(os.path.dirname(__file__), "test/xsdtest/xsdtestsuite.xml")
LOG="check-xsddata-test-suite.log"
log = open(LOG, "w")
diff --git a/configure b/configure
index 73e334a..3a382d4 100755
--- a/configure
+++ b/configure
@@ -2194,7 +2194,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
LIBXML_MAJOR_VERSION=2
LIBXML_MINOR_VERSION=6
-LIBXML_MICRO_VERSION=30
+LIBXML_MICRO_VERSION=31
LIBXML_MICRO_VERSION_SUFFIX=
LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX
LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION
diff --git a/configure.in b/configure.in
index 2e55c7a..8aca04c 100644
--- a/configure.in
+++ b/configure.in
@@ -5,7 +5,7 @@ AC_CANONICAL_HOST
LIBXML_MAJOR_VERSION=2
LIBXML_MINOR_VERSION=6
-LIBXML_MICRO_VERSION=30
+LIBXML_MICRO_VERSION=31
LIBXML_MICRO_VERSION_SUFFIX=
LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX
LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION
diff --git a/doc/devhelp/libxml2-valid.html b/doc/devhelp/libxml2-valid.html
index 3b23e67..3480214 100644
--- a/doc/devhelp/libxml2-valid.html
+++ b/doc/devhelp/libxml2-valid.html
@@ -101,6 +101,7 @@ int <a href="#xmlIsRef">xmlIsRef</a> (<a href="libxml2-tree.html#xmlDocPtr">xm
<a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> <a href="#xmlCopyDocElementContent">xmlCopyDocElementContent</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur);
<a href="libxml2-tree.html#xmlIDPtr">xmlIDPtr</a> <a href="#xmlAddID">xmlAddID</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr);
void <a href="#xmlFreeRefTable">xmlFreeRefTable</a> (<a href="libxml2-valid.html#xmlRefTablePtr">xmlRefTablePtr</a> table);
+int <a href="#xmlValidateNamesValue">xmlValidateNamesValue</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
int <a href="#xmlRemoveID">xmlRemoveID</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr);
void <a href="#xmlFreeElementTable">xmlFreeElementTable</a> (<a href="libxml2-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> table);
void <a href="#xmlFreeIDTable">xmlFreeIDTable</a> (<a href="libxml2-valid.html#xmlIDTablePtr">xmlIDTablePtr</a> table);
@@ -112,7 +113,6 @@ int <a href="#xmlRemoveRef">xmlRemoveRef</a> (<a href="libxml2-tree.html#xmlDo
typedef void <a href="#xmlValidityWarningFunc">xmlValidityWarningFunc</a> (void * ctx, <br/> const char * msg, <br/> ... ...);
int <a href="#xmlValidatePopElement">xmlValidatePopElement</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * qname);
void <a href="#xmlFreeEnumeration">xmlFreeEnumeration</a> (<a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> cur);
-int <a href="#xmlValidateNamesValue">xmlValidateNamesValue</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
<a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> <a href="#xmlCopyEnumeration">xmlCopyEnumeration</a> (<a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> cur);
<a href="libxml2-tree.html#xmlAttributePtr">xmlAttributePtr</a> <a href="#xmlGetDtdAttrDesc">xmlGetDtdAttrDesc</a> (<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
int <a href="#xmlValidateDtd">xmlValidateDtd</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd);
diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am
index 36b7454..ea23621 100644
--- a/doc/examples/Makefile.am
+++ b/doc/examples/Makefile.am
@@ -9,6 +9,7 @@ examples.xml: index.py *.c
-@($(srcdir)/index.py)
index.html: examples.xml examples.xsl
+ -@(touch index.html)
-@(xsltproc examples.xsl examples.xml && echo "Rebuilt web page" && xmllint --valid --noout index.html)
install-data-local:
diff --git a/doc/examples/Makefile.in b/doc/examples/Makefile.in
index 34921d0..4665226 100644
--- a/doc/examples/Makefile.in
+++ b/doc/examples/Makefile.in
@@ -704,6 +704,7 @@ examples.xml: index.py *.c
-@($(srcdir)/index.py)
index.html: examples.xml examples.xsl
+ -@(touch index.html)
-@(xsltproc examples.xsl examples.xml && echo "Rebuilt web page" && xmllint --valid --noout index.html)
install-data-local:
diff --git a/doc/libxml2-api.xml b/doc/libxml2-api.xml
index 4e031bc..df478d6 100644
--- a/doc/libxml2-api.xml
+++ b/doc/libxml2-api.xml
@@ -1211,13 +1211,13 @@
<exports symbol='XML_SCHEMA_TYPE_SIMPLE' type='enum'/>
<exports symbol='XML_SCHEMAS_NCNAME' type='enum'/>
<exports symbol='XML_SCHEMAS_LONG' type='enum'/>
- <exports symbol='XML_SCHEMA_FACET_FRACTIONDIGITS' type='enum'/>
+ <exports symbol='XML_SCHEMA_TYPE_ANY_ATTRIBUTE' type='enum'/>
<exports symbol='XML_SCHEMAS_BOOLEAN' type='enum'/>
<exports symbol='XML_SCHEMAS_ENTITY' type='enum'/>
<exports symbol='XML_SCHEMA_TYPE_GROUP' type='enum'/>
<exports symbol='XML_SCHEMAS_GYEARMONTH' type='enum'/>
<exports symbol='XML_SCHEMAS_BASE64BINARY' type='enum'/>
- <exports symbol='XML_SCHEMA_TYPE_ANY_ATTRIBUTE' type='enum'/>
+ <exports symbol='XML_SCHEMA_FACET_FRACTIONDIGITS' type='enum'/>
<exports symbol='XML_SCHEMA_FACET_WHITESPACE' type='enum'/>
<exports symbol='XML_SCHEMAS_IDREF' type='enum'/>
<exports symbol='XML_SCHEMA_TYPE_ATTRIBUTE' type='enum'/>
@@ -1744,6 +1744,7 @@
<exports symbol='xmlCopyDocElementContent' type='function'/>
<exports symbol='xmlAddID' type='function'/>
<exports symbol='xmlFreeRefTable' type='function'/>
+ <exports symbol='xmlValidateNamesValue' type='function'/>
<exports symbol='xmlRemoveID' type='function'/>
<exports symbol='xmlFreeElementTable' type='function'/>
<exports symbol='xmlFreeIDTable' type='function'/>
@@ -1755,7 +1756,6 @@
<exports symbol='xmlValidityWarningFunc' type='function'/>
<exports symbol='xmlValidatePopElement' type='function'/>
<exports symbol='xmlFreeEnumeration' type='function'/>
- <exports symbol='xmlValidateNamesValue' type='function'/>
<exports symbol='xmlCopyEnumeration' type='function'/>
<exports symbol='xmlGetDtdAttrDesc' type='function'/>
<exports symbol='xmlValidateDtd' type='function'/>
@@ -3452,15 +3452,15 @@
<exports symbol='XPATH_ENCODING_ERROR' type='enum'/>
<exports symbol='XPTR_RESOURCE_ERROR' type='enum'/>
<exports symbol='XPATH_NUMBER' type='enum'/>
- <exports symbol='XPATH_INVALID_CTXT_SIZE' type='enum'/>
+ <exports symbol='XPATH_POINT' type='enum'/>
<exports symbol='XPATH_USERS' type='enum'/>
<exports symbol='XPATH_UNDEF_PREFIX_ERROR' type='enum'/>
<exports symbol='XPATH_UNKNOWN_FUNC_ERROR' type='enum'/>
+ <exports symbol='XPATH_INVALID_CTXT_SIZE' type='enum'/>
<exports symbol='XPATH_RANGE' type='enum'/>
<exports symbol='XPTR_SYNTAX_ERROR' type='enum'/>
<exports symbol='XPATH_LOCATIONSET' type='enum'/>
<exports symbol='XPATH_INVALID_CTXT' type='enum'/>
- <exports symbol='XPATH_POINT' type='enum'/>
<exports symbol='XPATH_INVALID_ARITY' type='enum'/>
<exports symbol='XPATH_STRING' type='enum'/>
<exports symbol='XPATH_INVALID_PREDICATE_ERROR' type='enum'/>
diff --git a/doc/libxml2.xsa b/doc/libxml2.xsa
index d20f6a4..c9fb529 100644
--- a/doc/libxml2.xsa
+++ b/doc/libxml2.xsa
@@ -8,32 +8,19 @@
</vendor>
<product id="libxml2">
<name>libxml2</name>
- <version>2.6.29</version>
- <last-release> Jun 12 2007</last-release>
+ <version>2.6.30</version>
+ <last-release> Aug 23 2007</last-release>
<info-url>http://xmlsoft.org/</info-url>
- <changes> - Portability: patches from Andreas Stricke for WinCEi,
- fix compilation warnings (William Brack), avoid warnings on Apple OS/X
- (Wendy Doyle and Mark Rowe), Windows compilation and threading
- improvements (Rob Richards), compilation against old Python versions,
- new GNU tar changes (Ryan Hill)
- - Documentation: xmlURIUnescapeString comment,
- - Bugfixes: xmlBufferAdd problem (Richard Jones), 'make valgrind'
- flag fix (Richard Jones), regexp interpretation of \,
- htmlCreateDocParserCtxt (Jean-Daniel Dupas), configure.in
- typo (Bjorn Reese), entity content failure, xmlListAppend() fix
- (Georges-André Silber), XPath number serialization (William Brack),
- nanohttp gzipped stream fix (William Brack and Alex Cornejo),
- xmlCharEncFirstLine typo (Mark Rowe), uri bug (François Delyon),
- XPath string value of PI nodes (William Brack), XPath node set
- sorting bugs (William Brack), avoid outputting namespace decl
- dups in the writer (Rob Richards), xmlCtxtReset bug, UTF-8 encoding
- error handling, recustion on next in catalogs, fix a Relax-NG crash,
- workaround wrong file: URIs, htmlNodeDumpFormatOutput on attributes,
- invalid character in attribute detection bug, big comments before
- internal subset streaming bug, HTML parsing of attributes with : in
- the name, IDness of name in HTML (Dagfinn I. Mannsåker)
- - Improvement: keep URI query parts in raw form (Richard Jones),
- embed tag support in HTML (Michael Day)
+ <changes> - Portability: Solaris crash on error handling, windows path fixes
+ (Roland Schwarz and Rob Richards), mingw build (Roland Schwarz)
+ - Bugfixes: xmlXPathNodeSetSort problem (William Brack), leak when
+ reusing a writer for a new document (Dodji Seketeli), Schemas
+ xsi:nil handling patch (Frank Gross), relative URI build problem
+ (Patrik Fimml), crash in xmlDocFormatDump, invalid char in comment
+ detection bug, fix disparity with xmlSAXUserParseMemory, automata
+ generation for complex regexp counts problems, Schemas IDC import
+ problems (Frank Gross), xpath predicate evailation error handling
+ (William Brack)
</changes>
</product>
diff --git a/doc/news.html b/doc/news.html
index 867b81a..f320d17 100644
--- a/doc/news.html
+++ b/doc/news.html
@@ -12,7 +12,24 @@ to help those</p><ul><li>More testing on RelaxNG</li>
<li>Finishing up <a href="http://www.w3.org/TR/xmlschema-1/">XML
Schemas</a></li>
</ul><p>The <a href="ChangeLog.html">change log</a> describes the recents commits
-to the <a href="http://svn.gnome.org/viewcvs/libxml2/trunk/">SVN</a> code base.</p><p>Here is the list of public releases:</p><h3>2.6.30: Aug 23 2007</h3><ul><li>Portability: Solaris crash on error handling, windows path fixes
+to the <a href="http://svn.gnome.org/viewcvs/libxml2/trunk/">SVN</a> code base.</p><p>Here is the list of public releases:</p><h3>2.6.31: Jan 11 2008</h3><ul><li>Security fix: missing of checks in UTF-8 parsing</li>
+ <li>Bug fixes: regexp bug, dump attribute from XHTML document, fix
+ xmlFree(NULL) to not crash in debug mode, Schematron parsing crash
+ (Rob Richards), global lock free on Windows (Marc-Antoine Ruel),
+ XSD crash due to double free (Rob Richards), indentation fix in
+ xmlTextWriterFullEndElement (Felipe Pena), error in attribute type
+ parsing if attribute redeclared, avoid crash in hash list scanner if
+ deleting elements, column counter bug fix (Christian Schmidt),
+ HTML embed element saving fix (Stefan Behnel), avoid -L/usr/lib
+ output from xml2-config (Fred Crozat), avoid an xmllint crash
+ (Stefan Kost), don't stop HTML parsing on out of range chars.
+ </li>
+ <li>Code cleanup: fix open() call third argument, regexp cut'n paste
+ copy error, unused variable in __xmlGlobalInitMutexLock (Hannes Eder),
+ some make distcheck realted fixes (John Carr)</li>
+ <li>Improvements: HTTP Header: includes port number (William Brack),
+ testURI --debug option, </li>
+</ul><h3>2.6.30: Aug 23 2007</h3><ul><li>Portability: Solaris crash on error handling, windows path fixes
(Roland Schwarz and Rob Richards), mingw build (Roland Schwarz)</li>
<li>Bugfixes: xmlXPathNodeSetSort problem (William Brack), leak when
reusing a writer for a new document (Dodji Seketeli), Schemas
diff --git a/doc/xml.html b/doc/xml.html
index 1a44244..355dbed 100644
--- a/doc/xml.html
+++ b/doc/xml.html
@@ -739,6 +739,26 @@ to the <a href="http://svn.gnome.org/viewcvs/libxml2/trunk/">SVN</a> code base.<
<p>Here is the list of public releases:</p>
+<h3>2.6.31: Jan 11 2008</h3>
+<ul>
+ <li>Security fix: missing of checks in UTF-8 parsing</li>
+ <li>Bug fixes: regexp bug, dump attribute from XHTML document, fix
+ xmlFree(NULL) to not crash in debug mode, Schematron parsing crash
+ (Rob Richards), global lock free on Windows (Marc-Antoine Ruel),
+ XSD crash due to double free (Rob Richards), indentation fix in
+ xmlTextWriterFullEndElement (Felipe Pena), error in attribute type
+ parsing if attribute redeclared, avoid crash in hash list scanner if
+ deleting elements, column counter bug fix (Christian Schmidt),
+ HTML embed element saving fix (Stefan Behnel), avoid -L/usr/lib
+ output from xml2-config (Fred Crozat), avoid an xmllint crash
+ (Stefan Kost), don't stop HTML parsing on out of range chars.
+ </li>
+ <li>Code cleanup: fix open() call third argument, regexp cut'n paste
+ copy error, unused variable in __xmlGlobalInitMutexLock (Hannes Eder),
+ some make distcheck realted fixes (John Carr)</li>
+ <li>Improvements: HTTP Header: includes port number (William Brack),
+ testURI --debug option, </li>
+</ul>
<h3>2.6.30: Aug 23 2007</h3>
<ul>
<li>Portability: Solaris crash on error handling, windows path fixes
diff --git a/globals.c b/globals.c
index c104a1a..636ff87 100644
--- a/globals.c
+++ b/globals.c
@@ -60,6 +60,7 @@ void xmlCleanupGlobals(void)
xmlFreeMutex(xmlThrDefMutex);
xmlThrDefMutex = NULL;
}
+ __xmlGlobalInitMutexDestroy();
}
/************************************************************************
diff --git a/hash.c b/hash.c
index e92a5a0..22f9bb4 100644
--- a/hash.c
+++ b/hash.c
@@ -828,7 +828,7 @@ xmlHashScan(xmlHashTablePtr table, xmlHashScanner f, void *data) {
*/
void
xmlHashScanFull(xmlHashTablePtr table, xmlHashScannerFull f, void *data) {
- int i;
+ int i, nb;
xmlHashEntryPtr iter;
xmlHashEntryPtr next;
@@ -844,10 +844,21 @@ xmlHashScanFull(xmlHashTablePtr table, xmlHashScannerFull f, void *data) {
iter = &(table->table[i]);
while (iter) {
next = iter->next;
+ nb = table->nbElems;
if ((f != NULL) && (iter->payload != NULL))
f(iter->payload, data, iter->name,
iter->name2, iter->name3);
- iter = next;
+ if (nb != table->nbElems) {
+ /* table was modified by the callback, be careful */
+ if (iter == &(table->table[i])) {
+ if (table->table[i].valid == 0)
+ iter = NULL;
+ if (table->table[i].next != next)
+ iter = &(table->table[i]);
+ } else
+ iter = next;
+ } else
+ iter = next;
}
}
}
diff --git a/include/libxml/xmlversion.h b/include/libxml/xmlversion.h
index 71c21ea..adb4f4e 100644
--- a/include/libxml/xmlversion.h
+++ b/include/libxml/xmlversion.h
@@ -29,21 +29,21 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* the version string like "1.2.3"
*/
-#define LIBXML_DOTTED_VERSION "2.6.30"
+#define LIBXML_DOTTED_VERSION "2.6.31"
/**
* LIBXML_VERSION:
*
* the version number: 1.2.3 value is 10203
*/
-#define LIBXML_VERSION 20630
+#define LIBXML_VERSION 20631
/**
* LIBXML_VERSION_STRING:
*
* the version number string, 1.2.3 value is "10203"
*/
-#define LIBXML_VERSION_STRING "20630"
+#define LIBXML_VERSION_STRING "20631"
/**
* LIBXML_VERSION_EXTRA:
@@ -58,7 +58,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
* Macro to check that the libxml version in use is compatible with
* the version the software has been compiled against
*/
-#define LIBXML_TEST_VERSION xmlCheckVersion(20630);
+#define LIBXML_TEST_VERSION xmlCheckVersion(20631);
#ifndef VMS
#if 0
diff --git a/libxml.h b/libxml.h
index 39e60f2..d61a8f3 100644
--- a/libxml.h
+++ b/libxml.h
@@ -80,6 +80,7 @@ void __htmlParseContent(void *ctx);
*/
void __xmlGlobalInitMutexLock(void);
void __xmlGlobalInitMutexUnlock(void);
+void __xmlGlobalInitMutexDestroy(void);
#ifdef IN_LIBXML
#ifdef __GNUC__
diff --git a/libxml2.spec b/libxml2.spec
index 86048ba..40632aa 100644
--- a/libxml2.spec
+++ b/libxml2.spec
@@ -1,6 +1,6 @@
Summary: Library providing XML and HTML support
Name: libxml2
-Version: 2.6.30
+Version: 2.6.31
Release: 1
License: MIT
Group: Development/Libraries
@@ -128,6 +128,6 @@ rm -fr %{buildroot}
%doc doc/python.html
%changelog
-* Thu Aug 23 2007 Daniel Veillard <veillard@redhat.com>
-- upstream release 2.6.30 see http://xmlsoft.org/news.html
+* Fri Jan 11 2008 Daniel Veillard <veillard@redhat.com>
+- upstream release 2.6.31 see http://xmlsoft.org/news.html
diff --git a/ltmain.sh b/ltmain.sh
index f924d30..13c5494 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -43,7 +43,7 @@ EXIT_FAILURE=1
PROGRAM=ltmain.sh
PACKAGE=libtool
-VERSION="1.5.24 Debian 1.5.24-1"
+VERSION="1.5.24 Debian 1.5.24-2"
TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)"
# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
diff --git a/nanohttp.c b/nanohttp.c
index 2406e7e..91c7e87 100644
--- a/nanohttp.c
+++ b/nanohttp.c
@@ -1364,8 +1364,13 @@ retry:
if (ctxt->query != NULL)
p += snprintf( p, blen - (p - bp), "?%s", ctxt->query);
- p += snprintf( p, blen - (p - bp), " HTTP/1.0\r\nHost: %s\r\n",
+ if (ctxt->port == 80) {
+ p += snprintf( p, blen - (p - bp), " HTTP/1.0\r\nHost: %s\r\n",
ctxt->hostname);
+ } else {
+ p += snprintf( p, blen - (p - bp), " HTTP/1.0\r\nHost: %s:%d\r\n",
+ ctxt->hostname, ctxt->port);
+ }
#ifdef HAVE_ZLIB_H
p += snprintf(p, blen - (p - bp), "Accept-Encoding: gzip\r\n");
@@ -1585,7 +1590,7 @@ xmlNanoHTTPSave(void *ctxt, const char *filename) {
if (!strcmp(filename, "-"))
fd = 0;
else {
- fd = open(filename, O_CREAT | O_WRONLY);
+ fd = open(filename, O_CREAT | O_WRONLY, 0666);
if (fd < 0) {
xmlNanoHTTPClose(ctxt);
return(-1);
diff --git a/parser.c b/parser.c
index 9d05111..529e061 100644
--- a/parser.c
+++ b/parser.c
@@ -957,7 +957,7 @@ mem_error:
* @fullattr: the attribute fullname
* @type: the attribute type
*
- * Register that this attribute is not CDATA
+ * Register this attribute type
*/
static void
xmlAddSpecialAttr(xmlParserCtxtPtr ctxt,
@@ -971,6 +971,9 @@ xmlAddSpecialAttr(xmlParserCtxtPtr ctxt,
goto mem_error;
}
+ if (xmlHashLookup2(ctxt->attsSpecial, fullname, fullattr) != NULL)
+ return;
+
xmlHashAddEntry2(ctxt->attsSpecial, fullname, fullattr,
(void *) (long) type);
return;
@@ -981,6 +984,45 @@ mem_error:
}
/**
+ * xmlCleanSpecialAttrCallback:
+ *
+ * Removes CDATA attributes from the special attribute table
+ */
+static void
+xmlCleanSpecialAttrCallback(void *payload, void *data,
+ const xmlChar *fullname, const xmlChar *fullattr,
+ const xmlChar *unused ATTRIBUTE_UNUSED) {
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) data;
+
+ if (((long) payload) == XML_ATTRIBUTE_CDATA) {
+ xmlHashRemoveEntry2(ctxt->attsSpecial, fullname, fullattr, NULL);
+ }
+}
+
+/**
+ * xmlCleanSpecialAttr:
+ * @ctxt: an XML parser context
+ *
+ * Trim the list of attributes defined to remove all those of type
+ * CDATA as they are not special. This call should be done when finishing
+ * to parse the DTD and before starting to parse the document root.
+ */
+static void
+xmlCleanSpecialAttr(xmlParserCtxtPtr ctxt)
+{
+ if (ctxt->attsSpecial == NULL)
+ return;
+
+ xmlHashScanFull(ctxt->attsSpecial, xmlCleanSpecialAttrCallback, ctxt);
+
+ if (xmlHashSize(ctxt->attsSpecial) == 0) {
+ xmlHashFree(ctxt->attsSpecial, NULL);
+ ctxt->attsSpecial = NULL;
+ }
+ return;
+}
+
+/**
* xmlCheckLanguageID:
* @lang: pointer to the string value
*
@@ -3493,7 +3535,7 @@ xmlParseCharData(xmlParserCtxtPtr ctxt, int cdata) {
in = ctxt->input->cur;
do {
get_more_space:
- while (*in == 0x20) in++;
+ while (*in == 0x20) { in++; ctxt->input->col++; }
if (*in == 0xA) {
do {
ctxt->input->line++; ctxt->input->col = 1;
@@ -5006,7 +5048,7 @@ xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt) {
(def != XML_ATTRIBUTE_REQUIRED)) {
xmlAddDefAttrs(ctxt, elemName, attrName, defaultValue);
}
- if ((ctxt->sax2) && (type != XML_ATTRIBUTE_CDATA)) {
+ if (ctxt->sax2) {
xmlAddSpecialAttr(ctxt, elemName, attrName, type);
}
if (defaultValue != NULL)
@@ -9245,6 +9287,7 @@ xmlParseDocument(xmlParserCtxtPtr ctxt) {
ctxt->extSubSystem, ctxt->extSubURI);
ctxt->inSubset = 0;
+ xmlCleanSpecialAttr(ctxt);
ctxt->instate = XML_PARSER_PROLOG;
xmlParseMisc(ctxt);
@@ -10208,6 +10251,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
ctxt->intSubName, ctxt->extSubSystem,
ctxt->extSubURI);
ctxt->inSubset = 0;
+ xmlCleanSpecialAttr(ctxt);
ctxt->instate = XML_PARSER_PROLOG;
#ifdef DEBUG_PUSH
xmlGenericError(xmlGenericErrorContext,
@@ -10435,6 +10479,7 @@ found_end_int_subset:
ctxt->sax->externalSubset(ctxt->userData, ctxt->intSubName,
ctxt->extSubSystem, ctxt->extSubURI);
ctxt->inSubset = 0;
+ xmlCleanSpecialAttr(ctxt);
ctxt->instate = XML_PARSER_PROLOG;
ctxt->checkIndex = 0;
#ifdef DEBUG_PUSH
diff --git a/parserInternals.c b/parserInternals.c
index 3560f50..d7aa4cf 100644
--- a/parserInternals.c
+++ b/parserInternals.c
@@ -693,7 +693,7 @@ xmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) {
if ((*ctxt->input->cur == 0) &&
(ctxt->input->end > ctxt->input->cur)) {
xmlErrEncodingInt(ctxt, XML_ERR_INVALID_CHAR,
- "Char 0x%X out of allowed range\n", val);
+ "Char 0x0 out of allowed range\n", 0);
}
if (*ctxt->input->cur == 0xD) {
if (ctxt->input->cur[1] == 0xA) {
diff --git a/pattern.c b/pattern.c
index cf41606..ee51968 100644
--- a/pattern.c
+++ b/pattern.c
@@ -1091,6 +1091,7 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) {
}
}
XML_PAT_FREE_STRING(ctxt, prefix);
+ name = NULL;
if (token == NULL) {
if (CUR == '*') {
NEXT;
@@ -1157,6 +1158,7 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) {
}
}
XML_PAT_FREE_STRING(ctxt, prefix);
+ name = NULL;
if (token == NULL) {
if (CUR == '*') {
NEXT;
diff --git a/python/Makefile.am b/python/Makefile.am
index 6c0bffa..667c2c8 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -49,6 +49,12 @@ install-data-local:
@(for doc in $(DOCS) ; \
do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done)
+uninstall-local:
+ @(for doc in $(DOCS) ; \
+ do rm $(DESTDIR)$(DOCS_DIR)/`basename $$doc` ; done)
+ rm $(DESTDIR)$(pythondir)/drv_libxml2.py
+ rm $(DESTDIR)$(pythondir)/libxml2.py
+
GENERATE = generator.py
API_DESC = $(top_srcdir)/doc/libxml2-api.xml $(srcdir)/libxml2-python-api.xml
GENERATED= libxml2class.py \
diff --git a/python/Makefile.in b/python/Makefile.in
index d2c06f1..ba4b446 100644
--- a/python/Makefile.in
+++ b/python/Makefile.in
@@ -660,6 +660,7 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
+@WITH_PYTHON_FALSE@uninstall-local:
@WITH_PYTHON_FALSE@install-data-local:
clean: clean-recursive
@@ -710,7 +711,8 @@ ps: ps-recursive
ps-am:
-uninstall-am: uninstall-info-am uninstall-pythonLTLIBRARIES
+uninstall-am: uninstall-info-am uninstall-local \
+ uninstall-pythonLTLIBRARIES
uninstall-info: uninstall-info-recursive
@@ -728,7 +730,7 @@ uninstall-info: uninstall-info-recursive
mostlyclean mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
tags tags-recursive uninstall uninstall-am uninstall-info-am \
- uninstall-pythonLTLIBRARIES
+ uninstall-local uninstall-pythonLTLIBRARIES
@WITH_PYTHON_TRUE@all-local: libxml2.py
@@ -744,6 +746,12 @@ uninstall-info: uninstall-info-recursive
@WITH_PYTHON_TRUE@ @(for doc in $(DOCS) ; \
@WITH_PYTHON_TRUE@ do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done)
+@WITH_PYTHON_TRUE@uninstall-local:
+@WITH_PYTHON_TRUE@ @(for doc in $(DOCS) ; \
+@WITH_PYTHON_TRUE@ do rm $(DESTDIR)$(DOCS_DIR)/`basename $$doc` ; done)
+@WITH_PYTHON_TRUE@ rm $(DESTDIR)$(pythondir)/drv_libxml2.py
+@WITH_PYTHON_TRUE@ rm $(DESTDIR)$(pythondir)/libxml2.py
+
@WITH_PYTHON_TRUE@$(GENERATED): gen_prog
@WITH_PYTHON_TRUE@gen_prog: $(srcdir)/$(GENERATE) $(API_DESC)
diff --git a/python/libxml2-py.c b/python/libxml2-py.c
index 0874a60..adf552f 100644
--- a/python/libxml2-py.c
+++ b/python/libxml2-py.c
@@ -708,22 +708,6 @@ libxml_xmlParseCDSect(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
#if defined(LIBXML_UNICODE_ENABLED)
PyObject *
-libxml_xmlUCSIsLatinExtendedB(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
- PyObject *py_retval;
- int c_retval;
- int code;
-
- if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsLatinExtendedB", &code))
- return(NULL);
-
- c_retval = xmlUCSIsLatinExtendedB(code);
- py_retval = libxml_intWrap((int) c_retval);
- return(py_retval);
-}
-
-#endif /* defined(LIBXML_UNICODE_ENABLED) */
-#if defined(LIBXML_UNICODE_ENABLED)
-PyObject *
libxml_xmlUCSIsLatinExtendedA(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
PyObject *py_retval;
int c_retval;
@@ -4555,6 +4539,22 @@ libxml_xmlGetProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
return(py_retval);
}
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsLatinExtendedB(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsLatinExtendedB", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsLatinExtendedB(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
#if defined(LIBXML_CATALOG_ENABLED)
PyObject *
libxml_xmlACatalogResolveURI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
diff --git a/python/setup.py b/python/setup.py
index ec714e8..342c6ab 100755
--- a/python/setup.py
+++ b/python/setup.py
@@ -226,7 +226,7 @@ else:
setup (name = "libxml2-python",
# On *nix, the version number is created from setup.py.in
# On windows, it is set by configure.js
- version = "2.6.30",
+ version = "2.6.31",
description = descr,
author = "Daniel Veillard",
author_email = "veillard@redhat.com",
diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am
index 39950f6..5ba503a 100644
--- a/python/tests/Makefile.am
+++ b/python/tests/Makefile.am
@@ -77,3 +77,7 @@ install-data-local:
-(for test in $(PYTESTS) $(XMLS); \
do @INSTALL@ -m 0644 $(srcdir)/$$test $(DESTDIR)$(EXAMPLE_DIR) ; done)
+uninstall-local:
+ @(for test in $(PYTESTS) $(XMLS) ; \
+ do rm $(DESTDIR)$(EXAMPLE_DIR)/`basename $$test` ; done)
+
diff --git a/python/tests/Makefile.in b/python/tests/Makefile.in
index f96b92d..fbe218b 100644
--- a/python/tests/Makefile.in
+++ b/python/tests/Makefile.in
@@ -466,7 +466,7 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-info-am
+uninstall-am: uninstall-info-am uninstall-local
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
@@ -476,7 +476,7 @@ uninstall-am: uninstall-info-am
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- uninstall uninstall-am uninstall-info-am
+ uninstall uninstall-am uninstall-info-am uninstall-local
@WITH_PYTHON_TRUE@tests: $(PYTESTS)
@@ -498,6 +498,10 @@ install-data-local:
$(mkinstalldirs) $(DESTDIR)$(EXAMPLE_DIR)
-(for test in $(PYTESTS) $(XMLS); \
do @INSTALL@ -m 0644 $(srcdir)/$$test $(DESTDIR)$(EXAMPLE_DIR) ; done)
+
+uninstall-local:
+ @(for test in $(PYTESTS) $(XMLS) ; \
+ do rm $(DESTDIR)$(EXAMPLE_DIR)/`basename $$test` ; done)
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/schematron.c b/schematron.c
index a2eabcc..146ffc9 100644
--- a/schematron.c
+++ b/schematron.c
@@ -1204,6 +1204,9 @@ xmlSchematronParse(xmlSchematronParserCtxtPtr ctxt)
}
/* the original document must be kept for reporting */
ret->doc = doc;
+ if (preserve) {
+ ret->preserve = 1;
+ }
preserve = 1;
exit:
diff --git a/testURI.c b/testURI.c
index aa0729d..d20989d 100644
--- a/testURI.c
+++ b/testURI.c
@@ -18,6 +18,7 @@
static const char *base = NULL;
static int escape = 0;
+static int debug = 0;
static void handleURI(const char *str) {
int ret;
@@ -31,6 +32,19 @@ static void handleURI(const char *str) {
if (ret != 0)
printf("%s : error %d\n", str, ret);
else {
+ if (debug) {
+ if (uri->scheme) printf("scheme: %s\n", uri->scheme);
+ if (uri->opaque) printf("opaque: %s\n", uri->opaque);
+ if (uri->authority) printf("authority: %s\n", uri->authority);
+ if (uri->server) printf("server: %s\n", uri->server);
+ if (uri->user) printf("user: %s\n", uri->user);
+ if (uri->port != 0) printf("port: %d\n", uri->port);
+ if (uri->path) printf("path: %s\n", uri->path);
+ if (uri->query) printf("query: %s\n", uri->query);
+ if (uri->fragment) printf("fragment: %s\n", uri->fragment);
+ if (uri->query_raw) printf("query_raw: %s\n", uri->query_raw);
+ if (uri->cleanup != 0) printf("cleanup\n");
+ }
xmlNormalizeURIPath(uri->path);
if (escape != 0) {
parsed = xmlSaveUri(uri);
@@ -72,6 +86,11 @@ int main(int argc, char **argv) {
arg++;
escape++;
}
+ if ((argc > arg) && (argv[arg] != NULL) &&
+ ((!strcmp(argv[arg], "-debug")) || (!strcmp(argv[arg], "--debug")))) {
+ arg++;
+ debug++;
+ }
if (argv[arg] == NULL) {
char str[1024];
diff --git a/threads.c b/threads.c
index 0ab9e77..d5a177d 100644
--- a/threads.c
+++ b/threads.c
@@ -428,8 +428,6 @@ __xmlGlobalInitMutexLock(void)
{
/* Make sure the global init lock is initialized and then lock it. */
#ifdef HAVE_PTHREAD_H
- int err;
-
/* The mutex is statically initialized, so we just lock it. */
pthread_mutex_lock(&global_init_lock);
#elif defined HAVE_WIN32_THREADS
@@ -451,6 +449,7 @@ __xmlGlobalInitMutexLock(void)
* section in the global_init_lock then discard the one
* allocated by this thread. */
if (global_init_lock != cs) {
+ DeleteCriticalSection(cs);
free(cs);
}
}
@@ -500,6 +499,24 @@ __xmlGlobalInitMutexUnlock(void)
#endif
}
+/**
+ * xmlGlobalInitMutexDestroy
+ *
+ * Makes sure that the global initialization mutex is destroyed before
+ * application termination.
+ */
+void __xmlGlobalInitMutexDestroy(void)
+{
+#if defined HAVE_WIN32_THREADS
+ if (global_init_lock != NULL)
+ {
+ DeleteCriticalSection(global_init_lock);
+ free(global_init_lock);
+ global_init_lock = NULL;
+ }
+#endif
+}
+
/************************************************************************
* *
* Per thread global state handling *
diff --git a/xml2-config.in b/xml2-config.in
index 2078224..0ebe53e 100644
--- a/xml2-config.in
+++ b/xml2-config.in
@@ -85,7 +85,7 @@ while test $# -gt 0; do
--libs)
if [ "`uname`" = "Linux" ]
then
- if [ "@XML_LIBDIR@" = "-L/usr/lib64" ]
+ if [ "@XML_LIBDIR@" = "-L/usr/lib" -o "@XML_LIBDIR@" = "-L/usr/lib64" ]
then
LIBS="@XML_LIBS@"
else
diff --git a/xmllint.c b/xmllint.c
index 14fda13..728f00a 100644
--- a/xmllint.c
+++ b/xmllint.c
@@ -257,7 +257,7 @@ xmllintExternalEntityLoader(const char *URL, const char *ID,
const char *lastsegment = URL;
const char *iter = URL;
- if (nbpaths > 0) {
+ if ((nbpaths > 0) && (iter != NULL)) {
while (*iter != 0) {
if (*iter == '/')
lastsegment = iter + 1;
diff --git a/xmlmemory.c b/xmlmemory.c
index 362a0b0..f9019a4 100644
--- a/xmlmemory.c
+++ b/xmlmemory.c
@@ -409,6 +409,9 @@ xmlMemFree(void *ptr)
size_t size;
#endif
+ if (ptr == NULL)
+ return;
+
if (ptr == (void *) -1) {
xmlGenericError(xmlGenericErrorContext,
"trying to free pointer from freed area\n");
diff --git a/xmlregexp.c b/xmlregexp.c
index 7f8921b..a3e16c5 100644
--- a/xmlregexp.c
+++ b/xmlregexp.c
@@ -1610,10 +1610,9 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from,
/* ???? For some reason it seems we never reach that
case, I suppose this got optimized out before when
building the automata */
-
+ copy = xmlRegCopyAtom(ctxt, atom);
if (copy == NULL)
return(-1);
- copy = xmlRegCopyAtom(ctxt, atom);
copy->quant = XML_REGEXP_QUANT_ONCE;
copy->min = 0;
copy->max = 0;
@@ -1711,9 +1710,11 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from,
xmlRegStateAddTrans(ctxt, to, atom, to, -1, -1);
break;
case XML_REGEXP_QUANT_RANGE:
+#if DV_test
if (atom->min == 0) {
xmlFAGenerateEpsilonTransition(ctxt, from, to);
}
+#endif
break;
default:
break;
@@ -3211,12 +3212,22 @@ xmlFARegExec(xmlRegexpPtr comp, const xmlChar *content) {
* this is a multiple input sequence
* If there is a counter associated increment it now.
* before potentially saving and rollback
+ * do not increment if the counter is already over the
+ * maximum limit in which case get to next transition
*/
if (trans->counter >= 0) {
- if (exec->counts == NULL) {
+ xmlRegCounterPtr counter;
+
+ if ((exec->counts == NULL) ||
+ (exec->comp == NULL) ||
+ (exec->comp->counters == NULL)) {
exec->status = -1;
goto error;
}
+ counter = &exec->comp->counters[trans->counter];
+ if (exec->counts[trans->counter] >= counter->max)
+ continue; /* for loop on transitions */
+
#ifdef DEBUG_REGEXP_EXEC
printf("Increasing count %d\n", trans->counter);
#endif
@@ -3312,10 +3323,18 @@ xmlFARegExec(xmlRegexpPtr comp, const xmlChar *content) {
xmlFARegExecSave(exec);
}
if (trans->counter >= 0) {
- if (exec->counts == NULL) {
- exec->status = -1;
+ xmlRegCounterPtr counter;
+
+ /* make sure we don't go over the counter maximum value */
+ if ((exec->counts == NULL) ||
+ (exec->comp == NULL) ||
+ (exec->comp->counters == NULL)) {
+ exec->status = -1;
goto error;
}
+ counter = &exec->comp->counters[trans->counter];
+ if (exec->counts[trans->counter] >= counter->max)
+ continue; /* for loop on transitions */
#ifdef DEBUG_REGEXP_EXEC
printf("Increasing count %d\n", trans->counter);
#endif
diff --git a/xmlsave.c b/xmlsave.c
index 30ebf49..cbabd78 100644
--- a/xmlsave.c
+++ b/xmlsave.c
@@ -1254,6 +1254,10 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
}
return;
}
+ if (cur->type == XML_ATTRIBUTE_NODE) {
+ xmlAttrDumpOutput(ctxt, (xmlAttrPtr) cur);
+ return;
+ }
format = ctxt->format;
if (format == 1) {
diff --git a/xmlwriter.c b/xmlwriter.c
index 7acae76..2d9d109 100644
--- a/xmlwriter.c
+++ b/xmlwriter.c
@@ -1256,6 +1256,11 @@ xmlTextWriterFullEndElement(xmlTextWriterPtr writer)
return -1;
}
+ if (writer->indent) {
+ count = xmlOutputBufferWriteString(writer->out, "\n");
+ sum += count;
+ }
+
xmlListPopFront(writer->nodes);
return sum;
}