summaryrefslogtreecommitdiff
path: root/libxml2
diff options
context:
space:
mode:
authorPedro Giffuni <pfg@apache.org>2012-12-20 20:48:42 +0000
committerPedro Giffuni <pfg@apache.org>2012-12-20 20:48:42 +0000
commit73e257f9a9c4f05bd499a79bc98a6bd8829a9afa (patch)
tree1deb070c8a4d55323beac803f5b4996699fe4ca2 /libxml2
parent3484496e57ab59b4f613d7c9f727b5945e17e5b4 (diff)
i121528 - Update internal libxml2 to version 2.7.8.
Despite not being the latest version, 2.7.8 has been relatively well tested and introduces no API changes. The last update to our internal XML C parser was done in Oct 6 2009, so the list of enhancements is quite big: http://xmlsoft.org/news.html In addition to the normal updates we include a couple of vulnerability fixes from FreeBSD.
Notes
Diffstat (limited to 'libxml2')
-rw-r--r--libxml2/libxml2-configure.patch20
-rw-r--r--libxml2/libxml2-fixes.patch41
-rw-r--r--libxml2/libxml2-global-symbols.patch4
-rw-r--r--libxml2/libxml2-gnome599717.patch20
-rw-r--r--libxml2/libxml2-long-path.patch8
-rw-r--r--libxml2/libxml2-mingw.patch27
-rw-r--r--libxml2/libxml2-runtest.patch4
-rw-r--r--libxml2/libxml2-testapi.patch4
-rw-r--r--libxml2/libxml2-xpath.patch70
-rw-r--r--libxml2/makefile.mk7
10 files changed, 72 insertions, 133 deletions
diff --git a/libxml2/libxml2-configure.patch b/libxml2/libxml2-configure.patch
index 4158c38ef47f..b396b5504c94 100644
--- a/libxml2/libxml2-configure.patch
+++ b/libxml2/libxml2-configure.patch
@@ -1,6 +1,6 @@
---- misc/libxml2-2.7.6/ltmain.sh 2009-10-06 17:39:54.000000000 +0100
-+++ misc/build/libxml2-2.7.6/ltmain.sh 2009-12-17 11:43:56.000000000 +0000
-@@ -6271,8 +6271,8 @@
+--- misc/libxml2-2.7.8/ltmain.sh 2009-10-06 17:39:54.000000000 +0100
++++ misc/build/libxml2-2.7.8/ltmain.sh 2009-12-17 11:43:56.000000000 +0000
+@@ -6599,8 +6599,8 @@
;;
freebsd-elf)
@@ -11,8 +11,8 @@
;;
irix | nonstopux)
---- misc/libxml2-2.7.6/include/libxml/xmlversion.h 2009-12-17 11:45:19.000000000 +0000
-+++ misc/build/libxml2-2.7.6/include/libxml/xmlversion.h 2009-12-17 11:45:36.000000000 +0000
+--- misc/libxml2-2.7.8/include/libxml/xmlversion.h 2009-12-17 11:45:19.000000000 +0000
++++ misc/build/libxml2-2.7.8/include/libxml/xmlversion.h 2009-12-17 11:45:36.000000000 +0000
@@ -264,7 +264,7 @@
*
* Whether iconv support is available
@@ -22,7 +22,7 @@
#define LIBXML_ICONV_ENABLED
#endif
-@@ -282,7 +282,7 @@
+@@ -291,7 +291,7 @@
*
* Whether Debugging module is configured in
*/
@@ -31,7 +31,7 @@
#define LIBXML_DEBUG_ENABLED
#endif
-@@ -291,7 +291,7 @@
+@@ -300,7 +300,7 @@
*
* Whether the memory debugging is configured in
*/
@@ -40,7 +40,7 @@
#define DEBUG_MEMORY_LOCATION
#endif
-@@ -300,7 +300,7 @@
+@@ -309,7 +309,7 @@
*
* Whether the runtime debugging is configured in
*/
@@ -49,8 +49,8 @@
#define LIBXML_DEBUG_RUNTIME
#endif
---- misc/libxml2-2.7.6/xml2-config.in 2009-12-17 11:45:20.000000000 +0000
-+++ misc/build/libxml2-2.7.6/xml2-config.in 2009-12-17 11:45:36.000000000 +0000
+--- misc/libxml2-2.7.8/xml2-config.in 2009-12-17 11:45:20.000000000 +0000
++++ misc/build/libxml2-2.7.8/xml2-config.in 2009-12-17 11:45:36.000000000 +0000
@@ -1,9 +1,14 @@
#! /bin/sh
diff --git a/libxml2/libxml2-fixes.patch b/libxml2/libxml2-fixes.patch
new file mode 100644
index 000000000000..1a2b24879e6f
--- /dev/null
+++ b/libxml2/libxml2-fixes.patch
@@ -0,0 +1,41 @@
+diff -ru misc/libxml2-2.7.8/parser.c misc/build/libxml2-2.7.8/parser.c
+--- misc/libxml2-2.7.8/parser.c 2010-11-04 10:55:45.000000000 -0500
++++ misc/build/libxml2-2.7.8/parser.c 2012-12-20 14:53:03.000000000 -0500
+@@ -2709,7 +2709,7 @@
+
+ buffer[nbchars++] = '&';
+ if (nbchars > buffer_size - i - XML_PARSER_BUFFER_SIZE) {
+- growBuffer(buffer, XML_PARSER_BUFFER_SIZE);
++ growBuffer(buffer, i + XML_PARSER_BUFFER_SIZE);
+ }
+ for (;i > 0;i--)
+ buffer[nbchars++] = *cur++;
+diff -ru misc/libxml2-2.7.8/xpointer.c misc/build/libxml2-2.7.8/xpointer.c
+--- misc/libxml2-2.7.8/xpointer.c 2010-10-12 01:25:33.000000000 -0500
++++ misc/build/libxml2-2.7.8/xpointer.c 2012-12-20 14:53:03.000000000 -0500
+@@ -1007,21 +1007,14 @@
+ NEXT;
+ break;
+ }
+- *cur++ = CUR;
+ } else if (CUR == '(') {
+ level++;
+- *cur++ = CUR;
+ } else if (CUR == '^') {
+- NEXT;
+- if ((CUR == ')') || (CUR == '(') || (CUR == '^')) {
+- *cur++ = CUR;
+- } else {
+- *cur++ = '^';
+- *cur++ = CUR;
+- }
+- } else {
+- *cur++ = CUR;
++ if ((NXT(1) == ')') || (NXT(1) == '(') || (NXT(1) == '^')) {
++ NEXT;
++ }
+ }
++ *cur++ = CUR;
+ NEXT;
+ }
+ *cur = 0;
diff --git a/libxml2/libxml2-global-symbols.patch b/libxml2/libxml2-global-symbols.patch
index 20cd273d745c..89f4a81e57a0 100644
--- a/libxml2/libxml2-global-symbols.patch
+++ b/libxml2/libxml2-global-symbols.patch
@@ -1,5 +1,5 @@
---- misc/libxml2-2.7.6/libxml2.syms Tue Oct 6 18:31:35 2009
-+++ misc/build/libxml2-2.7.6/libxml2.syms Wed Jul 7 15:43:17 2010
+--- misc/libxml2-2.7.8/libxml2.syms Tue Oct 6 18:31:35 2009
++++ misc/build/libxml2-2.7.8/libxml2.syms Wed Jul 7 15:43:17 2010
@@ -2184,10 +2184,10 @@
} LIBXML2_2.6.27;
diff --git a/libxml2/libxml2-gnome599717.patch b/libxml2/libxml2-gnome599717.patch
deleted file mode 100644
index cc6617d0e699..000000000000
--- a/libxml2/libxml2-gnome599717.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- misc/libxml2-2.7.6/relaxng.c 2009-12-17 11:53:12.000000000 +0000
-+++ misc/build/libxml2-2.7.6/relaxng.c 2009-12-17 16:30:43.000000000 +0000
-@@ -5369,7 +5369,7 @@
- } else {
- xmlRngPErr(ctxt, node, XML_RNGP_CHOICE_CONTENT,
- "expecting name, anyName, nsName or choice : got %s\n",
-- (node == NULL ? "nothing" : node->name), NULL);
-+ (node == NULL ? BAD_CAST "nothing" : node->name), NULL);
- return (NULL);
- }
- if (ret != def) {
-@@ -9459,7 +9459,7 @@
- ctxt->states = NULL;
- if (found == 0) {
- if (cur == NULL) {
-- VALID_ERR2(XML_RELAXNG_ERR_INTEREXTRA, "noname");
-+ VALID_ERR2(XML_RELAXNG_ERR_INTEREXTRA, BAD_CAST "noname");
- } else {
- VALID_ERR2(XML_RELAXNG_ERR_INTEREXTRA, cur->name);
- }
diff --git a/libxml2/libxml2-long-path.patch b/libxml2/libxml2-long-path.patch
index bd888d99e183..86a06bbaeae4 100644
--- a/libxml2/libxml2-long-path.patch
+++ b/libxml2/libxml2-long-path.patch
@@ -1,5 +1,5 @@
---- misc/libxml2-2.7.6/uri.c 2009-10-02 17:28:55.000000000 +0200
-+++ misc/build/libxml2-2.7.6/uri.c 2011-02-24 13:47:19.349299000 +0100
+--- misc/libxml2-2.7.8/uri.c 2009-10-02 17:28:55.000000000 +0200
++++ misc/build/libxml2-2.7.8/uri.c 2011-02-24 13:47:19.349299000 +0100
@@ -2479,7 +2479,16 @@
if (path == NULL)
return(NULL);
@@ -18,8 +18,8 @@
if ((path[0] == '/') && (path[1] == '/') && (path[2] != '/'))
path++;
---- misc/libxml2-2.7.6/xmlIO.c 2009-09-24 17:32:00.000000000 +0200
-+++ misc/build/libxml2-2.7.6/xmlIO.c 2011-02-24 13:47:26.163762000 +0100
+--- misc/libxml2-2.7.8/xmlIO.c 2009-09-24 17:32:00.000000000 +0200
++++ misc/build/libxml2-2.7.8/xmlIO.c 2011-02-24 13:47:26.163762000 +0100
@@ -772,6 +772,11 @@
#ifdef HAVE_STAT
diff --git a/libxml2/libxml2-mingw.patch b/libxml2/libxml2-mingw.patch
index 651b0c13f1bb..0db449ec2a24 100644
--- a/libxml2/libxml2-mingw.patch
+++ b/libxml2/libxml2-mingw.patch
@@ -1,6 +1,6 @@
---- misc/libxml2-2.7.6/configure 2008-01-11 17:01:56.000000000 +0900
-+++ misc/build/libxml2-2.7.6/configure 2009-09-07 20:48:47.656250000 +0900
-@@ -19914,6 +19914,8 @@
+--- misc/libxml2-2.7.8/configure 2008-01-11 17:01:56.000000000 +0900
++++ misc/build/libxml2-2.7.8/configure 2009-09-07 20:48:47.656250000 +0900
+@@ -13566,6 +13566,8 @@
if test "$with_modules" != "no" ; then
case "$host" in
@@ -8,8 +8,8 @@
+ ;;
*-*-cygwin*)
MODULE_EXTENSION=".dll"
- { $as_echo "$as_me:$LINENO: checking for dlopen in -lcygwin" >&5
-@@ -20632,11 +20636,10 @@
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lcygwin" >&5
+@@ -13868,11 +13868,10 @@
fi
case $host_os in
@@ -22,8 +22,8 @@
;;
*cygwin*) THREAD_LIBS=""
;;
---- misc/libxml2-2.7.6/libxml.h 2007-11-23 19:47:23.000000000 +0900
-+++ misc/build/libxml2-2.7.6/libxml.h 2009-07-10 14:37:34.988250000 +0900
+--- misc/libxml2-2.7.8/libxml.h 2007-11-23 19:47:23.000000000 +0900
++++ misc/build/libxml2-2.7.8/libxml.h 2009-07-10 14:37:34.988250000 +0900
@@ -30,6 +30,10 @@
#include <libxml/xmlversion.h>
#else
@@ -34,15 +34,4 @@
+#endif
#include <libxml/xmlversion.h>
#endif
-
---- misc/libxml2-2.7.6/include/libxml/xmlexports.h 2009-09-25 00:31:59.000000000 +0900
-+++ misc/build/libxml2-2.7.6/include/libxml/xmlexports.h 2010-06-06 11:15:54.160750000 +0900
-@@ -113,7 +113,7 @@
- * _imp__xmlFree listed as missing. Try to workaround the problem
- * by also making that declaration when compiling client code.
- */
-- #if !defined(LIBXML_STATIC)
-+ #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
- #define XMLPUBFUN __declspec(dllexport)
- #define XMLPUBVAR __declspec(dllexport)
- #else
+ \ No newline at end of file
diff --git a/libxml2/libxml2-runtest.patch b/libxml2/libxml2-runtest.patch
index 660d169586ac..8a78e93fb276 100644
--- a/libxml2/libxml2-runtest.patch
+++ b/libxml2/libxml2-runtest.patch
@@ -1,5 +1,5 @@
---- misc/libxml2-2.7.6/runtest.c 2009-09-24 23:32:00.000000000 +0800
-+++ misc/build/libxml2-2.7.6/runtest.c 2012-05-29 14:17:16.852600200 +0800
+--- misc/libxml2-2.7.8/runtest.c 2009-09-24 23:32:00.000000000 +0800
++++ misc/build/libxml2-2.7.8/runtest.c 2012-05-29 14:17:16.852600200 +0800
@@ -2728,7 +2728,7 @@
"file:///path/to/a%20b.html",
"/path/to/a b.html",
diff --git a/libxml2/libxml2-testapi.patch b/libxml2/libxml2-testapi.patch
index 381a30faedcd..447eba4af6f7 100644
--- a/libxml2/libxml2-testapi.patch
+++ b/libxml2/libxml2-testapi.patch
@@ -1,5 +1,5 @@
---- misc/libxml2-2.7.6/testapi.c 2009-09-24 23:32:00.000000000 +0800
-+++ misc/build/libxml2-2.7.6/testapi.c 2012-05-29 14:17:00.868020600 +0800
+--- misc/libxml2-2.7.8/testapi.c 2009-09-24 23:32:00.000000000 +0800
++++ misc/build/libxml2-2.7.8/testapi.c 2012-05-29 14:17:00.868020600 +0800
@@ -291,7 +291,7 @@
static xmlChar gen_xmlChar(int no, int nr ATTRIBUTE_UNUSED) {
if (no == 0) return('a');
diff --git a/libxml2/libxml2-xpath.patch b/libxml2/libxml2-xpath.patch
deleted file mode 100644
index 107de91ed862..000000000000
--- a/libxml2/libxml2-xpath.patch
+++ /dev/null
@@ -1,70 +0,0 @@
---- misc/libxml2-2.7.6/xpath.c 2009-09-24 17:32:00.000000000 +0200
-+++ misc/build/libxml2-2.7.6/xpath.c 2011-01-03 17:21:08.788256100 +0100
-@@ -8106,9 +8106,17 @@
- xmlNodePtr
- xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
- if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);
-- if (cur != NULL && cur->children != NULL)
-- return cur->children ;
-- if (cur == NULL) cur = ctxt->context->node;
-+ if ((cur != NULL) && (cur->type != XML_ATTRIBUTE_NODE) &&
-+ (cur->type != XML_NAMESPACE_DECL) && (cur->children != NULL))
-+ return(cur->children);
-+
-+ if (cur == NULL) {
-+ cur = ctxt->context->node;
-+ if (cur->type == XML_NAMESPACE_DECL)
-+ return(NULL);
-+ if (cur->type == XML_ATTRIBUTE_NODE)
-+ cur = cur->parent;
-+ }
- if (cur == NULL) return(NULL) ; /* ERROR */
- if (cur->next != NULL) return(cur->next) ;
- do {
-@@ -8162,8 +8170,13 @@
- xmlXPathNextPreceding(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
- {
- if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);
-- if (cur == NULL)
-+ if (cur == NULL) {
- cur = ctxt->context->node;
-+ if (cur->type == XML_NAMESPACE_DECL)
-+ return(NULL);
-+ if (cur->type == XML_ATTRIBUTE_NODE)
-+ return(cur->parent);
-+ }
- if (cur == NULL)
- return (NULL);
- if ((cur->prev != NULL) && (cur->prev->type == XML_DTD_NODE))
-@@ -8207,8 +8220,8 @@
- cur = ctxt->context->node;
- if (cur == NULL)
- return (NULL);
-- if (cur->type == XML_NAMESPACE_DECL)
-- cur = (xmlNodePtr)((xmlNsPtr)cur)->next;
-+ if (cur->type == XML_NAMESPACE_DECL)
-+ return (NULL);
- ctxt->ancestor = cur->parent;
- }
- if ((cur->prev != NULL) && (cur->prev->type == XML_DTD_NODE))
-@@ -11737,11 +11750,16 @@
-
- if ((ctxt->error != XPATH_EXPRESSION_OK) || (res == -1)) {
- xmlXPathObjectPtr tmp;
-- /* pop the result */
-+ /* pop the result if any */
- tmp = valuePop(ctxt);
-- xmlXPathReleaseObject(xpctxt, tmp);
-- /* then pop off contextObj, which will be freed later */
-- valuePop(ctxt);
-+ if (tmp != contextObj) {
-+ /*
-+ * Free up the result
-+ * then pop off contextObj, which will be freed later
-+ */
-+ xmlXPathReleaseObject(xpctxt, tmp);
-+ valuePop(ctxt);
-+ }
- goto evaluation_error;
- }
-
diff --git a/libxml2/makefile.mk b/libxml2/makefile.mk
index 0887bd3c736c..79f66ebabdbe 100644
--- a/libxml2/makefile.mk
+++ b/libxml2/makefile.mk
@@ -38,16 +38,15 @@ all:
# --- Files --------------------------------------------------------
-LIBXML2VERSION=2.7.6
+LIBXML2VERSION=2.7.8
TARFILE_NAME=$(PRJNAME)-$(LIBXML2VERSION)
-TARFILE_MD5=7740a8ec23878a2f50120e1faa2730f2
+TARFILE_MD5=8127a65e8c3b08856093099b52599c86
# libxml2-global-symbols: #i112480#: Solaris ld won't export non-listed symbols
PATCH_FILES=libxml2-configure.patch \
libxml2-mingw.patch \
- libxml2-gnome599717.patch \
- libxml2-xpath.patch \
+ libxml2-fixes.patch \
libxml2-global-symbols.patch \
libxml2-testapi.patch \
libxml2-runtest.patch