public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/libxml2/files/
@ 2018-02-11 13:31 Mart Raudsepp
  0 siblings, 0 replies; 5+ messages in thread
From: Mart Raudsepp @ 2018-02-11 13:31 UTC (permalink / raw
  To: gentoo-commits

commit:     c9f16c34d6906021849b9488b718b4922e6c726b
Author:     Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Fri Feb  2 15:42:14 2018 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Sun Feb 11 13:30:55 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9f16c34

dev-libs/libxml2: remove unused patches

Closes: https://github.com/gentoo/gentoo/pull/7025

 .../files/libxml2-2.9.4-CVE-2016-9318.patch        | 202 -------------
 .../files/libxml2-2.9.4-CVE-2017-0663.patch        |  43 ---
 .../files/libxml2-2.9.4-CVE-2017-5969.patch        |  63 ----
 .../files/libxml2-2.9.4-CVE-2017-7375.patch        |  35 ---
 .../files/libxml2-2.9.4-CVE-2017-7376.patch        |  31 --
 .../files/libxml2-2.9.4-CVE-2017-9047-9048.patch   | 116 --------
 .../files/libxml2-2.9.4-CVE-2017-9049-9050.patch   | 316 ---------------------
 .../files/libxml2-2.9.4-fix-root-node-cmp.patch    |  34 ---
 .../files/libxml2-2.9.4-heap-buffer-overflow.patch |  32 ---
 .../files/libxml2-2.9.4-osd-validation.patch       |  66 -----
 10 files changed, 938 deletions(-)

diff --git a/dev-libs/libxml2/files/libxml2-2.9.4-CVE-2016-9318.patch b/dev-libs/libxml2/files/libxml2-2.9.4-CVE-2016-9318.patch
deleted file mode 100644
index 5d1adb014a0..00000000000
--- a/dev-libs/libxml2/files/libxml2-2.9.4-CVE-2016-9318.patch
+++ /dev/null
@@ -1,202 +0,0 @@
-From 292be65a52ab9e0eb3a53b4e0be5a57bc6de59d3 Mon Sep 17 00:00:00 2001
-From: Doran Moppert <dmoppert@redhat.com>
-Date: Fri, 7 Apr 2017 16:45:56 +0200
-Subject: [PATCH 6/7] Add an XML_PARSE_NOXXE flag to block all entities loading
- even local
-
-For https://bugzilla.gnome.org/show_bug.cgi?id=772726
-
-* include/libxml/parser.h: Add a new parser flag XML_PARSE_NOXXE
-* elfgcchack.h, xmlIO.h, xmlIO.c: associated loading routine
-* include/libxml/xmlerror.h: new error raised
-* xmllint.c: adds --noxxe flag to activate the option
----
- elfgcchack.h              | 10 ++++++++++
- include/libxml/parser.h   |  3 ++-
- include/libxml/xmlIO.h    |  8 ++++++++
- include/libxml/xmlerror.h |  1 +
- parser.c                  |  4 ++++
- xmlIO.c                   | 40 +++++++++++++++++++++++++++++++++++-----
- xmllint.c                 |  5 +++++
- 7 files changed, 65 insertions(+), 6 deletions(-)
-
-diff --git a/elfgcchack.h b/elfgcchack.h
-index 8c52884a..1b81dcde 100644
---- a/elfgcchack.h
-+++ b/elfgcchack.h
-@@ -6547,6 +6547,16 @@ extern __typeof (xmlNoNetExternalEntityLoader) xmlNoNetExternalEntityLoader__int
- #endif
- #endif
- 
-+#ifdef bottom_xmlIO
-+#undef xmlNoXxeExternalEntityLoader
-+extern __typeof (xmlNoXxeExternalEntityLoader) xmlNoXxeExternalEntityLoader __attribute((alias("xmlNoXxeExternalEntityLoader__internal_alias")));
-+#else
-+#ifndef xmlNoXxeExternalEntityLoader
-+extern __typeof (xmlNoXxeExternalEntityLoader) xmlNoXxeExternalEntityLoader__internal_alias __attribute((visibility("hidden")));
-+#define xmlNoXxeExternalEntityLoader xmlNoXxeExternalEntityLoader__internal_alias
-+#endif
-+#endif
-+
- #ifdef bottom_tree
- #undef xmlNodeAddContent
- extern __typeof (xmlNodeAddContent) xmlNodeAddContent __attribute((alias("xmlNodeAddContent__internal_alias")));
-diff --git a/include/libxml/parser.h b/include/libxml/parser.h
-index 47fbec03..63ca1b97 100644
---- a/include/libxml/parser.h
-+++ b/include/libxml/parser.h
-@@ -1111,7 +1111,8 @@ typedef enum {
-     XML_PARSE_HUGE      = 1<<19,/* relax any hardcoded limit from the parser */
-     XML_PARSE_OLDSAX    = 1<<20,/* parse using SAX2 interface before 2.7.0 */
-     XML_PARSE_IGNORE_ENC= 1<<21,/* ignore internal document encoding hint */
--    XML_PARSE_BIG_LINES = 1<<22 /* Store big lines numbers in text PSVI field */
-+    XML_PARSE_BIG_LINES = 1<<22,/* Store big lines numbers in text PSVI field */
-+    XML_PARSE_NOXXE	= 1<<23 /* Forbid any external entity loading */
- } xmlParserOption;
- 
- XMLPUBFUN void XMLCALL
-diff --git a/include/libxml/xmlIO.h b/include/libxml/xmlIO.h
-index 3e41744d..8d3fdef5 100644
---- a/include/libxml/xmlIO.h
-+++ b/include/libxml/xmlIO.h
-@@ -299,6 +299,14 @@ XMLPUBFUN xmlParserInputPtr XMLCALL
- 					 const char *ID,
- 					 xmlParserCtxtPtr ctxt);
- 
-+/*
-+ * A predefined entity loader external entity expansion
-+ */
-+XMLPUBFUN xmlParserInputPtr XMLCALL
-+	xmlNoXxeExternalEntityLoader	(const char *URL,
-+					 const char *ID,
-+					 xmlParserCtxtPtr ctxt);
-+
- /*
-  * xmlNormalizeWindowsPath is obsolete, don't use it.
-  * Check xmlCanonicPath in uri.h for a better alternative.
-diff --git a/include/libxml/xmlerror.h b/include/libxml/xmlerror.h
-index 037c16d5..3036062d 100644
---- a/include/libxml/xmlerror.h
-+++ b/include/libxml/xmlerror.h
-@@ -470,6 +470,7 @@ typedef enum {
-     XML_IO_EADDRINUSE, /* 1554 */
-     XML_IO_EALREADY, /* 1555 */
-     XML_IO_EAFNOSUPPORT, /* 1556 */
-+    XML_IO_ILLEGAL_XXE, /* 1557 */
-     XML_XINCLUDE_RECURSION=1600,
-     XML_XINCLUDE_PARSE_VALUE, /* 1601 */
-     XML_XINCLUDE_ENTITY_DEF_MISMATCH, /* 1602 */
-diff --git a/parser.c b/parser.c
-index b832406a..8e11c127 100644
---- a/parser.c
-+++ b/parser.c
-@@ -15352,6 +15352,10 @@ xmlCtxtUseOptionsInternal(xmlParserCtxtPtr ctxt, int options, const char *encodi
- 	ctxt->options |= XML_PARSE_NONET;
-         options -= XML_PARSE_NONET;
-     }
-+    if (options & XML_PARSE_NOXXE) {
-+	ctxt->options |= XML_PARSE_NOXXE;
-+        options -= XML_PARSE_NOXXE;
-+    }
-     if (options & XML_PARSE_COMPACT) {
- 	ctxt->options |= XML_PARSE_COMPACT;
-         options -= XML_PARSE_COMPACT;
-diff --git a/xmlIO.c b/xmlIO.c
-index 6e61f45a..34881461 100644
---- a/xmlIO.c
-+++ b/xmlIO.c
-@@ -212,6 +212,7 @@ static const char *IOerr[] = {
-     "adddress in use",		/* EADDRINUSE */
-     "already in use",		/* EALREADY */
-     "unknown address familly",	/* EAFNOSUPPORT */
-+    "Attempt to load external entity %s", /* XML_IO_ILLEGAL_XXE */
- };
- 
- #if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
-@@ -4057,13 +4058,22 @@ xmlDefaultExternalEntityLoader(const char *URL, const char *ID,
-     xmlGenericError(xmlGenericErrorContext,
-                     "xmlDefaultExternalEntityLoader(%s, xxx)\n", URL);
- #endif
--    if ((ctxt != NULL) && (ctxt->options & XML_PARSE_NONET)) {
-+    if (ctxt != NULL) {
-         int options = ctxt->options;
- 
--	ctxt->options -= XML_PARSE_NONET;
--        ret = xmlNoNetExternalEntityLoader(URL, ID, ctxt);
--	ctxt->options = options;
--	return(ret);
-+        if (options & XML_PARSE_NOXXE) {
-+            ctxt->options -= XML_PARSE_NOXXE;
-+            ret = xmlNoXxeExternalEntityLoader(URL, ID, ctxt);
-+            ctxt->options = options;
-+            return(ret);
-+        }
-+ 
-+        if (options & XML_PARSE_NONET) {
-+            ctxt->options -= XML_PARSE_NONET;
-+            ret = xmlNoNetExternalEntityLoader(URL, ID, ctxt);
-+            ctxt->options = options;
-+            return(ret);
-+        }
-     }
- #ifdef LIBXML_CATALOG_ENABLED
-     resource = xmlResolveResourceFromCatalog(URL, ID, ctxt);
-@@ -4164,6 +4174,13 @@ xmlNoNetExternalEntityLoader(const char *URL, const char *ID,
-     xmlParserInputPtr input = NULL;
-     xmlChar *resource = NULL;
- 
-+    if (ctxt == NULL) {
-+        return(NULL);
-+    }
-+    if (ctxt->input_id == 1) {
-+        return xmlDefaultExternalEntityLoader((const char *) URL, ID, ctxt);
-+    }
-+
- #ifdef LIBXML_CATALOG_ENABLED
-     resource = xmlResolveResourceFromCatalog(URL, ID, ctxt);
- #endif
-@@ -4186,5 +4203,18 @@ xmlNoNetExternalEntityLoader(const char *URL, const char *ID,
-     return(input);
- }
- 
-+xmlParserInputPtr
-+xmlNoXxeExternalEntityLoader(const char *URL, const char *ID,
-+                          xmlParserCtxtPtr ctxt) {
-+    if (ctxt == NULL) {
-+        return(NULL);
-+    }
-+    if (ctxt->input_id == 1) {
-+        return xmlDefaultExternalEntityLoader((const char *) URL, ID, ctxt);
-+    }
-+    xmlIOErr(XML_IO_ILLEGAL_XXE, (const char *) URL);
-+    return(NULL);
-+}
-+
- #define bottom_xmlIO
- #include "elfgcchack.h"
-diff --git a/xmllint.c b/xmllint.c
-index f8eb7ec4..8f304cda 100644
---- a/xmllint.c
-+++ b/xmllint.c
-@@ -3019,6 +3019,7 @@ static void usage(const char *name) {
-     printf("\t--path 'paths': provide a set of paths for resources\n");
-     printf("\t--load-trace : print trace of all external entities loaded\n");
-     printf("\t--nonet : refuse to fetch DTDs or entities over network\n");
-+    printf("\t--noxxe : forbid any external entity loading\n");
-     printf("\t--nocompact : do not generate compact text nodes\n");
-     printf("\t--htmlout : output results as HTML\n");
-     printf("\t--nowrap : do not put HTML doc wrapper\n");
-@@ -3461,6 +3462,10 @@ main(int argc, char **argv) {
-                    (!strcmp(argv[i], "--nonet"))) {
- 	    options |= XML_PARSE_NONET;
- 	    xmlSetExternalEntityLoader(xmlNoNetExternalEntityLoader);
-+        } else if ((!strcmp(argv[i], "-noxxe")) ||
-+                   (!strcmp(argv[i], "--noxxe"))) {
-+	    options |= XML_PARSE_NOXXE;
-+	    xmlSetExternalEntityLoader(xmlNoXxeExternalEntityLoader);
-         } else if ((!strcmp(argv[i], "-nocompact")) ||
-                    (!strcmp(argv[i], "--nocompact"))) {
- 	    options &= ~XML_PARSE_COMPACT;
--- 
-2.14.1
-

diff --git a/dev-libs/libxml2/files/libxml2-2.9.4-CVE-2017-0663.patch b/dev-libs/libxml2/files/libxml2-2.9.4-CVE-2017-0663.patch
deleted file mode 100644
index 517e178a533..00000000000
--- a/dev-libs/libxml2/files/libxml2-2.9.4-CVE-2017-0663.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From d815758b6a8c9dee8155268e49b5ef3b80135a14 Mon Sep 17 00:00:00 2001
-From: Nick Wellnhofer <wellnhofer@aevum.de>
-Date: Tue, 6 Jun 2017 12:56:28 +0200
-Subject: [PATCH 1/3] Fix type confusion in xmlValidateOneNamespace
-
-Comment out code that casts xmlNsPtr to xmlAttrPtr. ID types on
-namespace declarations make no practical sense anyway.
-
-Fixes bug 780228.
-
-Found with libFuzzer and ASan.
----
- valid.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/valid.c b/valid.c
-index 8075d3a0..c51ea290 100644
---- a/valid.c
-+++ b/valid.c
-@@ -4627,6 +4627,12 @@ xmlNodePtr elem, const xmlChar *prefix, xmlNsPtr ns, const xmlChar *value) {
- 	}
-     }
- 
-+    /*
-+     * Casting ns to xmlAttrPtr is wrong. We'd need separate functions
-+     * xmlAddID and xmlAddRef for namespace declarations, but it makes
-+     * no practical sense to use ID types anyway.
-+     */
-+#if 0
-     /* Validity Constraint: ID uniqueness */
-     if (attrDecl->atype == XML_ATTRIBUTE_ID) {
-         if (xmlAddID(ctxt, doc, value, (xmlAttrPtr) ns) == NULL)
-@@ -4638,6 +4644,7 @@ xmlNodePtr elem, const xmlChar *prefix, xmlNsPtr ns, const xmlChar *value) {
-         if (xmlAddRef(ctxt, doc, value, (xmlAttrPtr) ns) == NULL)
- 	    ret = 0;
-     }
-+#endif
- 
-     /* Validity Constraint: Notation Attributes */
-     if (attrDecl->atype == XML_ATTRIBUTE_NOTATION) {
--- 
-2.14.1
-

diff --git a/dev-libs/libxml2/files/libxml2-2.9.4-CVE-2017-5969.patch b/dev-libs/libxml2/files/libxml2-2.9.4-CVE-2017-5969.patch
deleted file mode 100644
index 4d1362f2f93..00000000000
--- a/dev-libs/libxml2/files/libxml2-2.9.4-CVE-2017-5969.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 8952ce48a5fa1d3de1f087f10e8b6e47bb59f4e3 Mon Sep 17 00:00:00 2001
-From: Daniel Veillard <veillard@redhat.com>
-Date: Wed, 7 Jun 2017 16:47:36 +0200
-Subject: [PATCH 1/7] Fix NULL pointer deref in xmlDumpElementContent
-
-Can only be triggered in recovery mode.
-
-Fixes bug 758422 (CVE-2017-5969).
----
- valid.c | 24 ++++++++++++++----------
- 1 file changed, 14 insertions(+), 10 deletions(-)
-
-diff --git a/valid.c b/valid.c
-index 19f84b82..0a8e58ab 100644
---- a/valid.c
-+++ b/valid.c
-@@ -1172,29 +1172,33 @@ xmlDumpElementContent(xmlBufferPtr buf, xmlElementContentPtr content, int glob)
- 	    xmlBufferWriteCHAR(buf, content->name);
- 	    break;
- 	case XML_ELEMENT_CONTENT_SEQ:
--	    if ((content->c1->type == XML_ELEMENT_CONTENT_OR) ||
--	        (content->c1->type == XML_ELEMENT_CONTENT_SEQ))
-+	    if ((content->c1 != NULL) &&
-+	        ((content->c1->type == XML_ELEMENT_CONTENT_OR) ||
-+	         (content->c1->type == XML_ELEMENT_CONTENT_SEQ)))
- 		xmlDumpElementContent(buf, content->c1, 1);
- 	    else
- 		xmlDumpElementContent(buf, content->c1, 0);
-             xmlBufferWriteChar(buf, " , ");
--	    if ((content->c2->type == XML_ELEMENT_CONTENT_OR) ||
--	        ((content->c2->type == XML_ELEMENT_CONTENT_SEQ) &&
--		 (content->c2->ocur != XML_ELEMENT_CONTENT_ONCE)))
-+	    if ((content->c2 != NULL) &&
-+	        ((content->c2->type == XML_ELEMENT_CONTENT_OR) ||
-+	         ((content->c2->type == XML_ELEMENT_CONTENT_SEQ) &&
-+		  (content->c2->ocur != XML_ELEMENT_CONTENT_ONCE))))
- 		xmlDumpElementContent(buf, content->c2, 1);
- 	    else
- 		xmlDumpElementContent(buf, content->c2, 0);
- 	    break;
- 	case XML_ELEMENT_CONTENT_OR:
--	    if ((content->c1->type == XML_ELEMENT_CONTENT_OR) ||
--	        (content->c1->type == XML_ELEMENT_CONTENT_SEQ))
-+	    if ((content->c1 != NULL) &&
-+	        ((content->c1->type == XML_ELEMENT_CONTENT_OR) ||
-+	         (content->c1->type == XML_ELEMENT_CONTENT_SEQ)))
- 		xmlDumpElementContent(buf, content->c1, 1);
- 	    else
- 		xmlDumpElementContent(buf, content->c1, 0);
-             xmlBufferWriteChar(buf, " | ");
--	    if ((content->c2->type == XML_ELEMENT_CONTENT_SEQ) ||
--	        ((content->c2->type == XML_ELEMENT_CONTENT_OR) &&
--		 (content->c2->ocur != XML_ELEMENT_CONTENT_ONCE)))
-+	    if ((content->c2 != NULL) &&
-+	        ((content->c2->type == XML_ELEMENT_CONTENT_SEQ) ||
-+	         ((content->c2->type == XML_ELEMENT_CONTENT_OR) &&
-+		  (content->c2->ocur != XML_ELEMENT_CONTENT_ONCE))))
- 		xmlDumpElementContent(buf, content->c2, 1);
- 	    else
- 		xmlDumpElementContent(buf, content->c2, 0);
--- 
-2.14.1
-

diff --git a/dev-libs/libxml2/files/libxml2-2.9.4-CVE-2017-7375.patch b/dev-libs/libxml2/files/libxml2-2.9.4-CVE-2017-7375.patch
deleted file mode 100644
index db9d597ad73..00000000000
--- a/dev-libs/libxml2/files/libxml2-2.9.4-CVE-2017-7375.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 9ea49a06b9421b6a3a9c243fb1ec23b19bd6b049 Mon Sep 17 00:00:00 2001
-From: Neel Mehta <nmehta@google.com>
-Date: Fri, 7 Apr 2017 17:43:02 +0200
-Subject: [PATCH 7/7] Prevent unwanted external entity reference
-
-For https://bugzilla.gnome.org/show_bug.cgi?id=780691
-
-* parser.c: add a specific check to avoid PE reference
----
- parser.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/parser.c b/parser.c
-index 8e11c127..e8e962bb 100644
---- a/parser.c
-+++ b/parser.c
-@@ -8125,6 +8125,15 @@ xmlParsePEReference(xmlParserCtxtPtr ctxt)
- 	    if (xmlPushInput(ctxt, input) < 0)
- 		return;
- 	} else {
-+	    if ((entity->etype == XML_EXTERNAL_PARAMETER_ENTITY) &&
-+	        ((ctxt->options & XML_PARSE_NOENT) == 0) &&
-+		((ctxt->options & XML_PARSE_DTDVALID) == 0) &&
-+		((ctxt->options & XML_PARSE_DTDLOAD) == 0) &&
-+		((ctxt->options & XML_PARSE_DTDATTR) == 0) &&
-+		(ctxt->replaceEntities == 0) &&
-+		(ctxt->validate == 0))
-+		return;
-+
- 	    /*
- 	     * TODO !!!
- 	     * handle the extra spaces added before and after
--- 
-2.14.1
-

diff --git a/dev-libs/libxml2/files/libxml2-2.9.4-CVE-2017-7376.patch b/dev-libs/libxml2/files/libxml2-2.9.4-CVE-2017-7376.patch
deleted file mode 100644
index 14ec773608b..00000000000
--- a/dev-libs/libxml2/files/libxml2-2.9.4-CVE-2017-7376.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 43cd3b6222bda2332e963eb1c9ead78f29912b0a Mon Sep 17 00:00:00 2001
-From: Daniel Veillard <veillard@redhat.com>
-Date: Fri, 7 Apr 2017 17:13:28 +0200
-Subject: [PATCH 2/3] Increase buffer space for port in HTTP redirect support
-
-For https://bugzilla.gnome.org/show_bug.cgi?id=780690
-
-nanohttp.c: the code wrongly assumed a short int port value.
----
- nanohttp.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/nanohttp.c b/nanohttp.c
-index 26e4290e..9c17530e 100644
---- a/nanohttp.c
-+++ b/nanohttp.c
-@@ -1423,9 +1423,9 @@ retry:
-     if (ctxt->port != 80) {
- 	/* reserve space for ':xxxxx', incl. potential proxy */
- 	if (proxy)
--	    blen += 12;
-+	    blen += 17;
- 	else
--	    blen += 6;
-+	    blen += 11;
-     }
-     bp = (char*)xmlMallocAtomic(blen);
-     if ( bp == NULL ) {
--- 
-2.14.1
-

diff --git a/dev-libs/libxml2/files/libxml2-2.9.4-CVE-2017-9047-9048.patch b/dev-libs/libxml2/files/libxml2-2.9.4-CVE-2017-9047-9048.patch
deleted file mode 100644
index f7c48cd877d..00000000000
--- a/dev-libs/libxml2/files/libxml2-2.9.4-CVE-2017-9047-9048.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-From 839b89e678b5265a0e6b0477410e64fac669d578 Mon Sep 17 00:00:00 2001
-From: Nick Wellnhofer <wellnhofer@aevum.de>
-Date: Sat, 3 Jun 2017 02:01:29 +0200
-Subject: [PATCH 4/7] Fix buffer size checks in xmlSnprintfElementContent
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-xmlSnprintfElementContent failed to correctly check the available
-buffer space in two locations.
-
-Fixes bug 781333 (CVE-2017-9047) and bug 781701 (CVE-2017-9048).
-
-Thanks to Marcel Böhme and Thuan Pham for the report.
----
- result/valid/781333.xml         |  5 +++++
- result/valid/781333.xml.err     |  3 +++
- result/valid/781333.xml.err.rdr |  6 ++++++
- test/valid/781333.xml           |  4 ++++
- valid.c                         | 20 +++++++++++---------
- 5 files changed, 29 insertions(+), 9 deletions(-)
- create mode 100644 result/valid/781333.xml
- create mode 100644 result/valid/781333.xml.err
- create mode 100644 result/valid/781333.xml.err.rdr
- create mode 100644 test/valid/781333.xml
-
-diff --git a/result/valid/781333.xml b/result/valid/781333.xml
-new file mode 100644
-index 00000000..45dc451d
---- /dev/null
-+++ b/result/valid/781333.xml
-@@ -0,0 +1,5 @@
-+<?xml version="1.0"?>
-+<!DOCTYPE a [
-+<!ELEMENT a (ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
 ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
 ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
 ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
 pppppppppppppppppppppppppp:llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
 lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
 lllllllllllllllllllllllllllllllll)>
-+]>
-+<a/>
-diff --git a/result/valid/781333.xml.err b/result/valid/781333.xml.err
-new file mode 100644
-index 00000000..b401b49a
---- /dev/null
-+++ b/result/valid/781333.xml.err
-@@ -0,0 +1,3 @@
-+./test/valid/781333.xml:4: element a: validity error : Element a content does not follow the DTD, expecting ( ..., got 
-+<a/>
-+    ^
-diff --git a/result/valid/781333.xml.err.rdr b/result/valid/781333.xml.err.rdr
-new file mode 100644
-index 00000000..5ff56992
---- /dev/null
-+++ b/result/valid/781333.xml.err.rdr
-@@ -0,0 +1,6 @@
-+./test/valid/781333.xml:4: element a: validity error : Element a content does not follow the DTD, expecting ( ..., got 
-+<a/>
-+    ^
-+./test/valid/781333.xml:5: element a: validity error : Element a content does not follow the DTD, Expecting more child
-+
-+^
-diff --git a/test/valid/781333.xml b/test/valid/781333.xml
-new file mode 100644
-index 00000000..b29e5a68
---- /dev/null
-+++ b/test/valid/781333.xml
-@@ -0,0 +1,4 @@
-+<!DOCTYPE a [
-+    <!ELEMENT a (ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
 ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
 ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
 ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
 pppppppppppppppppppppppppppppp:llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
 lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
 lllllllllllllllllllllllllllllllllllll)>
-+]>
-+<a/>
-diff --git a/valid.c b/valid.c
-index 0a8e58ab..8075d3a0 100644
---- a/valid.c
-+++ b/valid.c
-@@ -1266,22 +1266,23 @@ xmlSnprintfElementContent(char *buf, int size, xmlElementContentPtr content, int
-         case XML_ELEMENT_CONTENT_PCDATA:
-             strcat(buf, "#PCDATA");
- 	    break;
--	case XML_ELEMENT_CONTENT_ELEMENT:
-+	case XML_ELEMENT_CONTENT_ELEMENT: {
-+            int qnameLen = xmlStrlen(content->name);
-+
-+	    if (content->prefix != NULL)
-+                qnameLen += xmlStrlen(content->prefix) + 1;
-+	    if (size - len < qnameLen + 10) {
-+		strcat(buf, " ...");
-+		return;
-+	    }
- 	    if (content->prefix != NULL) {
--		if (size - len < xmlStrlen(content->prefix) + 10) {
--		    strcat(buf, " ...");
--		    return;
--		}
- 		strcat(buf, (char *) content->prefix);
- 		strcat(buf, ":");
- 	    }
--	    if (size - len < xmlStrlen(content->name) + 10) {
--		strcat(buf, " ...");
--		return;
--	    }
- 	    if (content->name != NULL)
- 		strcat(buf, (char *) content->name);
- 	    break;
-+        }
- 	case XML_ELEMENT_CONTENT_SEQ:
- 	    if ((content->c1->type == XML_ELEMENT_CONTENT_OR) ||
- 	        (content->c1->type == XML_ELEMENT_CONTENT_SEQ))
-@@ -1323,6 +1324,7 @@ xmlSnprintfElementContent(char *buf, int size, xmlElementContentPtr content, int
- 		xmlSnprintfElementContent(buf, size, content->c2, 0);
- 	    break;
-     }
-+    if (size - strlen(buf) <= 2) return;
-     if (englob)
-         strcat(buf, ")");
-     switch (content->ocur) {
--- 
-2.14.1
-

diff --git a/dev-libs/libxml2/files/libxml2-2.9.4-CVE-2017-9049-9050.patch b/dev-libs/libxml2/files/libxml2-2.9.4-CVE-2017-9049-9050.patch
deleted file mode 100644
index abf43ef9815..00000000000
--- a/dev-libs/libxml2/files/libxml2-2.9.4-CVE-2017-9049-9050.patch
+++ /dev/null
@@ -1,316 +0,0 @@
-From 9c95d1b7f3951efe09df66ec41d7b19d6283084d Mon Sep 17 00:00:00 2001
-From: Nick Wellnhofer <wellnhofer@aevum.de>
-Date: Mon, 5 Jun 2017 15:37:17 +0200
-Subject: [PATCH 3/7] Fix handling of parameter-entity references
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-There were two bugs where parameter-entity references could lead to an
-unexpected change of the input buffer in xmlParseNameComplex and
-xmlDictLookup being called with an invalid pointer.
-
-Percent sign in DTD Names
-=========================
-
-The NEXTL macro used to call xmlParserHandlePEReference. When parsing
-"complex" names inside the DTD, this could result in entity expansion
-which created a new input buffer. The fix is to simply remove the call
-to xmlParserHandlePEReference from the NEXTL macro. This is safe because
-no users of the macro require expansion of parameter entities.
-
-- xmlParseNameComplex
-- xmlParseNCNameComplex
-- xmlParseNmtoken
-
-The percent sign is not allowed in names, which are grammatical tokens.
-
-- xmlParseEntityValue
-
-Parameter-entity references in entity values are expanded but this
-happens in a separate step in this function.
-
-- xmlParseSystemLiteral
-
-Parameter-entity references are ignored in the system literal.
-
-- xmlParseAttValueComplex
-- xmlParseCharDataComplex
-- xmlParseCommentComplex
-- xmlParsePI
-- xmlParseCDSect
-
-Parameter-entity references are ignored outside the DTD.
-
-- xmlLoadEntityContent
-
-This function is only called from xmlStringLenDecodeEntities and
-entities are replaced in a separate step immediately after the function
-call.
-
-This bug could also be triggered with an internal subset and double
-entity expansion.
-
-This fixes bug 766956 initially reported by Wei Lei and independently by
-Chromium's ClusterFuzz, Hanno Böck, and Marco Grassi. Thanks to everyone
-involved.
-
-xmlParseNameComplex with XML_PARSE_OLD10
-========================================
-
-When parsing Names inside an expanded parameter entity with the
-XML_PARSE_OLD10 option, xmlParseNameComplex would call xmlGROW via the
-GROW macro if the input buffer was exhausted. At the end of the
-parameter entity's replacement text, this function would then call
-xmlPopInput which invalidated the input buffer.
-
-There should be no need to invoke GROW in this situation because the
-buffer is grown periodically every XML_PARSER_CHUNK_SIZE characters and,
-at least for UTF-8, in xmlCurrentChar. This also matches the code path
-executed when XML_PARSE_OLD10 is not set.
-
-This fixes bugs 781205 (CVE-2017-9049) and 781361 (CVE-2017-9050).
-Thanks to Marcel Böhme and Thuan Pham for the report.
-
-Additional hardening
-====================
-
-A separate check was added in xmlParseNameComplex to validate the
-buffer size.
----
- Makefile.am                     | 18 ++++++++++++++++++
- parser.c                        | 18 ++++++++++--------
- result/errors10/781205.xml      |  0
- result/errors10/781205.xml.err  | 21 +++++++++++++++++++++
- result/errors10/781361.xml      |  0
- result/errors10/781361.xml.err  | 13 +++++++++++++
- result/valid/766956.xml         |  0
- result/valid/766956.xml.err     |  9 +++++++++
- result/valid/766956.xml.err.rdr | 10 ++++++++++
- runtest.c                       |  3 +++
- test/errors10/781205.xml        |  3 +++
- test/errors10/781361.xml        |  3 +++
- test/valid/766956.xml           |  2 ++
- test/valid/dtds/766956.dtd      |  2 ++
- 14 files changed, 94 insertions(+), 8 deletions(-)
- create mode 100644 result/errors10/781205.xml
- create mode 100644 result/errors10/781205.xml.err
- create mode 100644 result/errors10/781361.xml
- create mode 100644 result/errors10/781361.xml.err
- create mode 100644 result/valid/766956.xml
- create mode 100644 result/valid/766956.xml.err
- create mode 100644 result/valid/766956.xml.err.rdr
- create mode 100644 test/errors10/781205.xml
- create mode 100644 test/errors10/781361.xml
- create mode 100644 test/valid/766956.xml
- create mode 100644 test/valid/dtds/766956.dtd
-
-diff --git a/Makefile.am b/Makefile.am
-index 3b52bae7..bf20124e 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -422,6 +422,24 @@ Errtests : xmllint$(EXEEXT)
- 	      if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
- 	      rm result.$$name error.$$name ; \
- 	  fi ; fi ; done)
-+	@echo "## Error cases regression tests (old 1.0)"
-+	-@(for i in $(srcdir)/test/errors10/*.xml ; do \
-+	  name=`basename $$i`; \
-+	  if [ ! -d $$i ] ; then \
-+	  if [ ! -f $(srcdir)/result/errors10/$$name ] ; then \
-+	      echo New test file $$name ; \
-+	      $(CHECKER) $(top_builddir)/xmllint --oldxml10 $$i \
-+	         2> $(srcdir)/result/errors10/$$name.err \
-+		 > $(srcdir)/result/errors10/$$name ; \
-+	      grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0"; \
-+	  else \
-+	      log=`$(CHECKER) $(top_builddir)/xmllint --oldxml10 $$i 2> error.$$name > result.$$name ; \
-+	      grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0"; \
-+	      diff $(srcdir)/result/errors10/$$name result.$$name ; \
-+	      diff $(srcdir)/result/errors10/$$name.err error.$$name` ; \
-+	      if [ -n "$$log" ] ; then echo $$name result ; echo "$$log" ; fi ; \
-+	      rm result.$$name error.$$name ; \
-+	  fi ; fi ; done)
- 	@echo "## Error cases stream regression tests"
- 	-@(for i in $(srcdir)/test/errors/*.xml ; do \
- 	  name=`basename $$i`; \
-diff --git a/parser.c b/parser.c
-index 53a6b7f0..b832406a 100644
---- a/parser.c
-+++ b/parser.c
-@@ -2115,7 +2115,6 @@ static void xmlGROW (xmlParserCtxtPtr ctxt) {
- 	ctxt->input->line++; ctxt->input->col = 1;			\
-     } else ctxt->input->col++;						\
-     ctxt->input->cur += l;				\
--    if (*ctxt->input->cur == '%') xmlParserHandlePEReference(ctxt);	\
-   } while (0)
- 
- #define CUR_CHAR(l) xmlCurrentChar(ctxt, &l)
-@@ -3406,13 +3405,6 @@ xmlParseNameComplex(xmlParserCtxtPtr ctxt) {
- 	    len += l;
- 	    NEXTL(l);
- 	    c = CUR_CHAR(l);
--	    if (c == 0) {
--		count = 0;
--		GROW;
--                if (ctxt->instate == XML_PARSER_EOF)
--                    return(NULL);
--		c = CUR_CHAR(l);
--	    }
- 	}
-     }
-     if ((len > XML_MAX_NAME_LENGTH) &&
-@@ -3420,6 +3412,16 @@ xmlParseNameComplex(xmlParserCtxtPtr ctxt) {
-         xmlFatalErr(ctxt, XML_ERR_NAME_TOO_LONG, "Name");
-         return(NULL);
-     }
-+    if (ctxt->input->cur - ctxt->input->base < len) {
-+        /*
-+         * There were a couple of bugs where PERefs lead to to a change
-+         * of the buffer. Check the buffer size to avoid passing an invalid
-+         * pointer to xmlDictLookup.
-+         */
-+        xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR,
-+                    "unexpected change of input buffer");
-+        return (NULL);
-+    }
-     if ((*ctxt->input->cur == '\n') && (ctxt->input->cur[-1] == '\r'))
-         return(xmlDictLookup(ctxt->dict, ctxt->input->cur - (len + 1), len));
-     return(xmlDictLookup(ctxt->dict, ctxt->input->cur - len, len));
-diff --git a/result/errors10/781205.xml b/result/errors10/781205.xml
-new file mode 100644
-index 00000000..e69de29b
-diff --git a/result/errors10/781205.xml.err b/result/errors10/781205.xml.err
-new file mode 100644
-index 00000000..da15c3f7
---- /dev/null
-+++ b/result/errors10/781205.xml.err
-@@ -0,0 +1,21 @@
-+Entity: line 1: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration
-+
-+ %a; 
-+    ^
-+Entity: line 1: 
-+<:0000
-+^
-+Entity: line 1: parser error : DOCTYPE improperly terminated
-+ %a; 
-+    ^
-+Entity: line 1: 
-+<:0000
-+^
-+namespace error : Failed to parse QName ':0000'
-+ %a; 
-+    ^
-+<:0000
-+      ^
-+./test/errors10/781205.xml:4: parser error : Couldn't find end of Start Tag :0000 line 1
-+
-+^
-diff --git a/result/errors10/781361.xml b/result/errors10/781361.xml
-new file mode 100644
-index 00000000..e69de29b
-diff --git a/result/errors10/781361.xml.err b/result/errors10/781361.xml.err
-new file mode 100644
-index 00000000..655f41a2
---- /dev/null
-+++ b/result/errors10/781361.xml.err
-@@ -0,0 +1,13 @@
-+./test/errors10/781361.xml:4: parser error : xmlParseElementDecl: 'EMPTY', 'ANY' or '(' expected
-+
-+^
-+./test/errors10/781361.xml:4: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration
-+
-+
-+^
-+./test/errors10/781361.xml:4: parser error : DOCTYPE improperly terminated
-+
-+^
-+./test/errors10/781361.xml:4: parser error : Start tag expected, '<' not found
-+
-+^
-diff --git a/result/valid/766956.xml b/result/valid/766956.xml
-new file mode 100644
-index 00000000..e69de29b
-diff --git a/result/valid/766956.xml.err b/result/valid/766956.xml.err
-new file mode 100644
-index 00000000..34b1dae6
---- /dev/null
-+++ b/result/valid/766956.xml.err
-@@ -0,0 +1,9 @@
-+test/valid/dtds/766956.dtd:2: parser error : PEReference: expecting ';'
-+%ä%ent;
-+   ^
-+Entity: line 1: parser error : Content error in the external subset
-+ %ent; 
-+      ^
-+Entity: line 1: 
-+value
-+^
-diff --git a/result/valid/766956.xml.err.rdr b/result/valid/766956.xml.err.rdr
-new file mode 100644
-index 00000000..77603462
---- /dev/null
-+++ b/result/valid/766956.xml.err.rdr
-@@ -0,0 +1,10 @@
-+test/valid/dtds/766956.dtd:2: parser error : PEReference: expecting ';'
-+%ä%ent;
-+   ^
-+Entity: line 1: parser error : Content error in the external subset
-+ %ent; 
-+      ^
-+Entity: line 1: 
-+value
-+^
-+./test/valid/766956.xml : failed to parse
-diff --git a/runtest.c b/runtest.c
-index 7d030bdc..cd233da9 100644
---- a/runtest.c
-+++ b/runtest.c
-@@ -4202,6 +4202,9 @@ testDesc testDescriptions[] = {
-     { "Error cases regression tests",
-       errParseTest, "./test/errors/*.xml", "result/errors/", "", ".err",
-       0 },
-+    { "Error cases regression tests (old 1.0)",
-+      errParseTest, "./test/errors10/*.xml", "result/errors10/", "", ".err",
-+      XML_PARSE_OLD10 },
- #ifdef LIBXML_READER_ENABLED
-     { "Error cases stream regression tests",
-       streamParseTest, "./test/errors/*.xml", "result/errors/", NULL, ".str",
-diff --git a/test/errors10/781205.xml b/test/errors10/781205.xml
-new file mode 100644
-index 00000000..d9e9e839
---- /dev/null
-+++ b/test/errors10/781205.xml
-@@ -0,0 +1,3 @@
-+<!DOCTYPE D [
-+  <!ENTITY % a "<:0000">
-+  %a;
-diff --git a/test/errors10/781361.xml b/test/errors10/781361.xml
-new file mode 100644
-index 00000000..67476bcb
---- /dev/null
-+++ b/test/errors10/781361.xml
-@@ -0,0 +1,3 @@
-+<!DOCTYPE doc [
-+  <!ENTITY % elem "<!ELEMENT e0000000000">
-+  %elem;
-diff --git a/test/valid/766956.xml b/test/valid/766956.xml
-new file mode 100644
-index 00000000..19a95a0e
---- /dev/null
-+++ b/test/valid/766956.xml
-@@ -0,0 +1,2 @@
-+<!DOCTYPE test SYSTEM "dtds/766956.dtd">
-+<test/>
-diff --git a/test/valid/dtds/766956.dtd b/test/valid/dtds/766956.dtd
-new file mode 100644
-index 00000000..dddde68b
---- /dev/null
-+++ b/test/valid/dtds/766956.dtd
-@@ -0,0 +1,2 @@
-+<!ENTITY % ent "value">
-+%ä%ent;
--- 
-2.14.1
-

diff --git a/dev-libs/libxml2/files/libxml2-2.9.4-fix-root-node-cmp.patch b/dev-libs/libxml2/files/libxml2-2.9.4-fix-root-node-cmp.patch
deleted file mode 100644
index 224d60ff052..00000000000
--- a/dev-libs/libxml2/files/libxml2-2.9.4-fix-root-node-cmp.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From a1fb9a4f511d89f0738b62cabd6d92bfd9eb94a9 Mon Sep 17 00:00:00 2001
-From: Nick Wellnhofer <wellnhofer@aevum.de>
-Date: Tue, 28 Jun 2016 14:19:58 +0200
-Subject: [PATCH 3/3] Fix comparison with root node in xmlXPathCmpNodes
-
-This change has already been made in xmlXPathCmpNodesExt but not in
-xmlXPathCmpNodes.
----
- xpath.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/xpath.c b/xpath.c
-index 67afbca5..5a01b1b3 100644
---- a/xpath.c
-+++ b/xpath.c
-@@ -3342,13 +3342,13 @@ xmlXPathCmpNodes(xmlNodePtr node1, xmlNodePtr node2) {
-      * compute depth to root
-      */
-     for (depth2 = 0, cur = node2;cur->parent != NULL;cur = cur->parent) {
--	if (cur == node1)
-+	if (cur->parent == node1)
- 	    return(1);
- 	depth2++;
-     }
-     root = cur;
-     for (depth1 = 0, cur = node1;cur->parent != NULL;cur = cur->parent) {
--	if (cur == node2)
-+	if (cur->parent == node2)
- 	    return(-1);
- 	depth1++;
-     }
--- 
-2.14.1
-

diff --git a/dev-libs/libxml2/files/libxml2-2.9.4-heap-buffer-overflow.patch b/dev-libs/libxml2/files/libxml2-2.9.4-heap-buffer-overflow.patch
deleted file mode 100644
index 770a1832b19..00000000000
--- a/dev-libs/libxml2/files/libxml2-2.9.4-heap-buffer-overflow.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From df4f9bdc7a37908ded8bd1fec4f75509eaa156de Mon Sep 17 00:00:00 2001
-From: David Kilzer <ddkilzer@apple.com>
-Date: Tue, 4 Jul 2017 18:38:03 +0200
-Subject: [PATCH 5/7] Heap-buffer-overflow read of size 1 in
- xmlFAParsePosCharGroup
-
-Credit to OSS-Fuzz.
-
-Add a check to xmlFAParseCharRange() for the end of the buffer
-to prevent reading past the end of it.
-
-This fixes Bug 784017.
----
- xmlregexp.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/xmlregexp.c b/xmlregexp.c
-index ca3b4f46..6676c2a8 100644
---- a/xmlregexp.c
-+++ b/xmlregexp.c
-@@ -5051,7 +5051,7 @@ xmlFAParseCharRange(xmlRegParserCtxtPtr ctxt) {
- 		return;
- 	}
-         len = 1;
--    } else if ((cur != 0x5B) && (cur != 0x5D)) {
-+    } else if ((cur != '\0') && (cur != 0x5B) && (cur != 0x5D)) {
-         end = CUR_SCHAR(ctxt->cur, len);
-     } else {
- 	ERROR("Expecting the end of a char range");
--- 
-2.14.1
-

diff --git a/dev-libs/libxml2/files/libxml2-2.9.4-osd-validation.patch b/dev-libs/libxml2/files/libxml2-2.9.4-osd-validation.patch
deleted file mode 100644
index 9d1a03346f6..00000000000
--- a/dev-libs/libxml2/files/libxml2-2.9.4-osd-validation.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 8bc6baccc7da291c2338b8d95953ea487b0b3ca1 Mon Sep 17 00:00:00 2001
-From: Alex Henrie <alexhenrie24@gmail.com>
-Date: Thu, 26 May 2016 17:38:35 -0600
-Subject: [PATCH 2/7] Fix attribute decoding during XML schema validation
-
-For https://bugzilla.gnome.org/show_bug.cgi?id=766834
-
-vctxt->parserCtxt is always NULL in xmlSchemaSAXHandleStartElementNs,
-so this function can't call xmlStringLenDecodeEntities to decode the
-entities.
----
- xmlschemas.c | 30 +++++++++++++++++++++++++-----
- 1 file changed, 25 insertions(+), 5 deletions(-)
-
-diff --git a/xmlschemas.c b/xmlschemas.c
-index e1b3a4f0..59535e5c 100644
---- a/xmlschemas.c
-+++ b/xmlschemas.c
-@@ -27391,6 +27391,7 @@ xmlSchemaSAXHandleStartElementNs(void *ctx,
-     * attributes yet.
-     */
-     if (nb_attributes != 0) {
-+	int valueLen, k, l;
- 	xmlChar *value;
- 
-         for (j = 0, i = 0; i < nb_attributes; i++, j += 5) {
-@@ -27400,12 +27401,31 @@ xmlSchemaSAXHandleStartElementNs(void *ctx,
- 	    * libxml2 differs from normal SAX here in that it escapes all ampersands
- 	    * as &#38; instead of delivering the raw converted string. Changing the
- 	    * behavior at this point would break applications that use this API, so
--	    * we are forced to work around it. There is no danger of accidentally
--	    * decoding some entity other than &#38; in this step because without
--	    * unescaped ampersands there can be no other entities in the string.
-+	    * we are forced to work around it.
- 	    */
--	    value = xmlStringLenDecodeEntities(vctxt->parserCtxt, attributes[j+3],
--		attributes[j+4] - attributes[j+3], XML_SUBSTITUTE_REF, 0, 0, 0);
-+	    valueLen = attributes[j+4] - attributes[j+3];
-+	    value = xmlMallocAtomic(valueLen + 1);
-+	    if (value == NULL) {
-+		xmlSchemaVErrMemory(vctxt,
-+		    "allocating string for decoded attribute",
-+		    NULL);
-+		goto internal_error;
-+	    }
-+	    for (k = 0, l = 0; k < valueLen; l++) {
-+		if (k < valueLen - 4 &&
-+		    attributes[j+3][k+0] == '&' &&
-+		    attributes[j+3][k+1] == '#' &&
-+		    attributes[j+3][k+2] == '3' &&
-+		    attributes[j+3][k+3] == '8' &&
-+		    attributes[j+3][k+4] == ';') {
-+		    value[l] = '&';
-+		    k += 5;
-+		} else {
-+		    value[l] = attributes[j+3][k];
-+		    k++;
-+		}
-+	    }
-+	    value[l] = '\0';
- 	    /*
- 	    * TODO: Set the node line.
- 	    */
--- 
-2.14.1
-


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/libxml2/files/
@ 2021-04-18  1:38 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2021-04-18  1:38 UTC (permalink / raw
  To: gentoo-commits

commit:     a54298ad9cd0f92c370573c087ad77e432e692ab
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 17 04:57:43 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr 18 01:38:23 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a54298ad

dev-libs/libxml2: tidy up patches

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/libxml2/files/libxml2-2.9.10-remove-TRUE.patch           | 7 -------
 dev-libs/libxml2/files/libxml2-2.9.10-xmllint-utf8.patch          | 8 --------
 dev-libs/libxml2/files/libxml2-2.9.2-python-ABIFLAG.patch         | 5 -----
 dev-libs/libxml2/files/libxml2-2.9.8-out-of-tree-test.patch       | 8 --------
 dev-libs/libxml2/files/libxml2-2.9.8-python3-unicode-errors.patch | 7 +++----
 5 files changed, 3 insertions(+), 32 deletions(-)

diff --git a/dev-libs/libxml2/files/libxml2-2.9.10-remove-TRUE.patch b/dev-libs/libxml2/files/libxml2-2.9.10-remove-TRUE.patch
index e405feb37c3..c979c841477 100644
--- a/dev-libs/libxml2/files/libxml2-2.9.10-remove-TRUE.patch
+++ b/dev-libs/libxml2/files/libxml2-2.9.10-remove-TRUE.patch
@@ -10,11 +10,6 @@ icu-68.1 removed macro definitions for TRUE and FALSE
 
 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
 ---
- encoding.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/encoding.c b/encoding.c
-index ad4d8a63..ea1fa99e 100644
 --- a/encoding.c
 +++ b/encoding.c
 @@ -1958,7 +1958,7 @@ xmlEncOutputChunk(xmlCharEncodingHandler *handler, unsigned char *out,
@@ -27,5 +22,3 @@ index ad4d8a63..ea1fa99e 100644
  #endif /* LIBXML_ICU_ENABLED */
      else {
 -- 
-2.29.2
-

diff --git a/dev-libs/libxml2/files/libxml2-2.9.10-xmllint-utf8.patch b/dev-libs/libxml2/files/libxml2-2.9.10-xmllint-utf8.patch
index 179f3a8c384..205b26b54f8 100644
--- a/dev-libs/libxml2/files/libxml2-2.9.10-xmllint-utf8.patch
+++ b/dev-libs/libxml2/files/libxml2-2.9.10-xmllint-utf8.patch
@@ -12,12 +12,6 @@ Thanks to @SuhwanSong and the Agency for Defense Development (ADD) for
 the report.
 
 Fixes #178.
----
- xmllint.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/xmllint.c b/xmllint.c
-index f6a8e463..c647486f 100644
 --- a/xmllint.c
 +++ b/xmllint.c
 @@ -528,6 +528,12 @@ static void
@@ -34,5 +28,3 @@ index f6a8e463..c647486f 100644
      if (result) {
  	xmlGenericError(xmlGenericErrorContext, "%s", result);
 -- 
-GitLab
-

diff --git a/dev-libs/libxml2/files/libxml2-2.9.2-python-ABIFLAG.patch b/dev-libs/libxml2/files/libxml2-2.9.2-python-ABIFLAG.patch
index 14dd5bc7342..7c5557f9915 100644
--- a/dev-libs/libxml2/files/libxml2-2.9.2-python-ABIFLAG.patch
+++ b/dev-libs/libxml2/files/libxml2-2.9.2-python-ABIFLAG.patch
@@ -1,8 +1,3 @@
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 14ac0a8..f787b12 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -844,7 +844,7 @@ if test "$with_python" != "no" ; then

diff --git a/dev-libs/libxml2/files/libxml2-2.9.8-out-of-tree-test.patch b/dev-libs/libxml2/files/libxml2-2.9.8-out-of-tree-test.patch
index fcc441d05de..1e269c3387b 100644
--- a/dev-libs/libxml2/files/libxml2-2.9.8-out-of-tree-test.patch
+++ b/dev-libs/libxml2/files/libxml2-2.9.8-out-of-tree-test.patch
@@ -9,12 +9,6 @@ When building out of tree, the relative path this test uses doesn't
 work.  Resolve the path relative to the test script itself instead.
 
 Url: https://bugs.gentoo.org/565576
----
- python/tests/reader5.py | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/python/tests/reader5.py b/python/tests/reader5.py
-index 82d0daea474a..da5355ffc4c6 100755
 --- a/python/tests/reader5.py
 +++ b/python/tests/reader5.py
 @@ -4,6 +4,7 @@
@@ -36,5 +30,3 @@ index 82d0daea474a..da5355ffc4c6 100755
  reader = input.newTextReader("REC")
  res=""
 -- 
-2.19.1
-

diff --git a/dev-libs/libxml2/files/libxml2-2.9.8-python3-unicode-errors.patch b/dev-libs/libxml2/files/libxml2-2.9.8-python3-unicode-errors.patch
index e87dcdedf88..db20221afe4 100644
--- a/dev-libs/libxml2/files/libxml2-2.9.8-python3-unicode-errors.patch
+++ b/dev-libs/libxml2/files/libxml2-2.9.8-python3-unicode-errors.patch
@@ -1,7 +1,6 @@
-Index: libxml2-2.9.5/python/libxml.c
-===================================================================
---- libxml2-2.9.5.orig/python/libxml.c
-+++ libxml2-2.9.5/python/libxml.c
+https://bugs.gentoo.org/745162
+--- a/python/libxml.c
++++ b/python/libxml.c
 @@ -1620,6 +1620,7 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU
      PyObject *message;
      PyObject *result;


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/libxml2/files/
@ 2021-05-20  2:23 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2021-05-20  2:23 UTC (permalink / raw
  To: gentoo-commits

commit:     0679042f0c80fded16eb8bb498f4bc02549c4064
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu May 20 02:23:11 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu May 20 02:23:11 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0679042f

dev-libs/libxml2: drop obsolete patch

See: 84479f64f0348164e1efe0fef1327346be45bf0d
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../libxml2-2.9.12-fix-lxml-compatibility.patch    | 214 ---------------------
 1 file changed, 214 deletions(-)

diff --git a/dev-libs/libxml2/files/libxml2-2.9.12-fix-lxml-compatibility.patch b/dev-libs/libxml2/files/libxml2-2.9.12-fix-lxml-compatibility.patch
deleted file mode 100644
index 844266038d3..00000000000
--- a/dev-libs/libxml2/files/libxml2-2.9.12-fix-lxml-compatibility.patch
+++ /dev/null
@@ -1,214 +0,0 @@
-https://gitlab.gnome.org/nwellnhof/libxml2/-/commit/7955b0d6fbbe49392ccc2e511edd00fbbfcb5a10.patch
-https://gitlab.gnome.org/GNOME/libxml2/-/issues/255
-https://bugs.gentoo.org/790737
-
-From 7955b0d6fbbe49392ccc2e511edd00fbbfcb5a10 Mon Sep 17 00:00:00 2001
-From: Nick Wellnhofer <wellnhofer@aevum.de>
-Date: Tue, 18 May 2021 20:08:28 +0200
-Subject: [PATCH] Work around lxml API abuse
-
-Make xmlNodeDumpOutput and htmlNodeDumpFormatOutput work with corrupted
-parent pointers. This used to work with the old recursive code but the
-non-recursive rewrite required parent pointers to be set correctly.
-
-Unfortunately, lxml relies on the old behavior and passes subtrees with
-a corrupted structure. Fall back to a recursive function call if an
-invalid parent pointer is detected.
-
-Fixes #255.
----
- HTMLtree.c | 46 ++++++++++++++++++++++++++++------------------
- xmlsave.c  | 31 +++++++++++++++++++++----------
- 2 files changed, 49 insertions(+), 28 deletions(-)
-
-diff --git a/HTMLtree.c b/HTMLtree.c
-index 24434d453..bdd639c7f 100644
---- a/HTMLtree.c
-+++ b/HTMLtree.c
-@@ -744,7 +744,7 @@ void
- htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
- 	                 xmlNodePtr cur, const char *encoding ATTRIBUTE_UNUSED,
-                          int format) {
--    xmlNodePtr root;
-+    xmlNodePtr root, parent;
-     xmlAttrPtr attr;
-     const htmlElemDesc * info;
- 
-@@ -755,6 +755,7 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
-     }
- 
-     root = cur;
-+    parent = cur->parent;
-     while (1) {
-         switch (cur->type) {
-         case XML_HTML_DOCUMENT_NODE:
-@@ -762,13 +763,25 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
-             if (((xmlDocPtr) cur)->intSubset != NULL) {
-                 htmlDtdDumpOutput(buf, (xmlDocPtr) cur, NULL);
-             }
--            if (cur->children != NULL) {
-+            /* Always validate cur->parent when descending. */
-+            if ((cur->parent == parent) && (cur->children != NULL)) {
-+                parent = cur;
-                 cur = cur->children;
-                 continue;
-             }
-             break;
- 
-         case XML_ELEMENT_NODE:
-+            /*
-+             * Some users like lxml are known to pass nodes with a corrupted
-+             * tree structure. Fall back to a recursive call to handle this
-+             * case.
-+             */
-+            if ((cur->parent != parent) && (cur->children != NULL)) {
-+                htmlNodeDumpFormatOutput(buf, doc, cur, encoding, format);
-+                break;
-+            }
-+
-             /*
-              * Get specific HTML info for that node.
-              */
-@@ -817,6 +830,7 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
-                     (cur->name != NULL) &&
-                     (cur->name[0] != 'p')) /* p, pre, param */
-                     xmlOutputBufferWriteString(buf, "\n");
-+                parent = cur;
-                 cur = cur->children;
-                 continue;
-             }
-@@ -825,9 +839,9 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
-                 (info != NULL) && (!info->isinline)) {
-                 if ((cur->next->type != HTML_TEXT_NODE) &&
-                     (cur->next->type != HTML_ENTITY_REF_NODE) &&
--                    (cur->parent != NULL) &&
--                    (cur->parent->name != NULL) &&
--                    (cur->parent->name[0] != 'p')) /* p, pre, param */
-+                    (parent != NULL) &&
-+                    (parent->name != NULL) &&
-+                    (parent->name[0] != 'p')) /* p, pre, param */
-                     xmlOutputBufferWriteString(buf, "\n");
-             }
- 
-@@ -842,9 +856,9 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
-                 break;
-             if (((cur->name == (const xmlChar *)xmlStringText) ||
-                  (cur->name != (const xmlChar *)xmlStringTextNoenc)) &&
--                ((cur->parent == NULL) ||
--                 ((xmlStrcasecmp(cur->parent->name, BAD_CAST "script")) &&
--                  (xmlStrcasecmp(cur->parent->name, BAD_CAST "style"))))) {
-+                ((parent == NULL) ||
-+                 ((xmlStrcasecmp(parent->name, BAD_CAST "script")) &&
-+                  (xmlStrcasecmp(parent->name, BAD_CAST "style"))))) {
-                 xmlChar *buffer;
- 
-                 buffer = xmlEncodeEntitiesReentrant(doc, cur->content);
-@@ -902,13 +916,9 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
-                 break;
-             }
- 
--            /*
--             * The parent should never be NULL here but we want to handle
--             * corrupted documents gracefully.
--             */
--            if (cur->parent == NULL)
--                return;
--            cur = cur->parent;
-+            cur = parent;
-+            /* cur->parent was validated when descending. */
-+            parent = cur->parent;
- 
-             if ((cur->type == XML_HTML_DOCUMENT_NODE) ||
-                 (cur->type == XML_DOCUMENT_NODE)) {
-@@ -939,9 +949,9 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
-                     (cur->next != NULL)) {
-                     if ((cur->next->type != HTML_TEXT_NODE) &&
-                         (cur->next->type != HTML_ENTITY_REF_NODE) &&
--                        (cur->parent != NULL) &&
--                        (cur->parent->name != NULL) &&
--                        (cur->parent->name[0] != 'p')) /* p, pre, param */
-+                        (parent != NULL) &&
-+                        (parent->name != NULL) &&
-+                        (parent->name[0] != 'p')) /* p, pre, param */
-                         xmlOutputBufferWriteString(buf, "\n");
-                 }
-             }
-diff --git a/xmlsave.c b/xmlsave.c
-index 61a40459b..aedbd5e70 100644
---- a/xmlsave.c
-+++ b/xmlsave.c
-@@ -847,7 +847,7 @@ htmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
- static void
- xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
-     int format = ctxt->format;
--    xmlNodePtr tmp, root, unformattedNode = NULL;
-+    xmlNodePtr tmp, root, unformattedNode = NULL, parent;
-     xmlAttrPtr attr;
-     xmlChar *start, *end;
-     xmlOutputBufferPtr buf;
-@@ -856,6 +856,7 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
-     buf = ctxt->buf;
- 
-     root = cur;
-+    parent = cur->parent;
-     while (1) {
-         switch (cur->type) {
-         case XML_DOCUMENT_NODE:
-@@ -868,7 +869,9 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
-             break;
- 
-         case XML_DOCUMENT_FRAG_NODE:
--            if (cur->children != NULL) {
-+            /* Always validate cur->parent when descending. */
-+            if ((cur->parent == parent) && (cur->children != NULL)) {
-+                parent = cur;
-                 cur = cur->children;
-                 continue;
-             }
-@@ -887,7 +890,18 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
-             break;
- 
-         case XML_ELEMENT_NODE:
--	    if ((cur != root) && (ctxt->format == 1) && (xmlIndentTreeOutput))
-+            /*
-+             * Some users like lxml are known to pass nodes with a corrupted
-+             * tree structure. Fall back to a recursive call to handle this
-+             * case.
-+             */
-+            if ((cur->parent != parent) && (cur->children != NULL)) {
-+                xmlNodeDumpOutputInternal(ctxt, cur);
-+                break;
-+            }
-+
-+	    if ((ctxt->level > 0) && (ctxt->format == 1) &&
-+                (xmlIndentTreeOutput))
- 		xmlOutputBufferWrite(buf, ctxt->indent_size *
- 				     (ctxt->level > ctxt->indent_nr ?
- 				      ctxt->indent_nr : ctxt->level),
-@@ -942,6 +956,7 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
-                 xmlOutputBufferWrite(buf, 1, ">");
-                 if (ctxt->format == 1) xmlOutputBufferWrite(buf, 1, "\n");
-                 if (ctxt->level >= 0) ctxt->level++;
-+                parent = cur;
-                 cur = cur->children;
-                 continue;
-             }
-@@ -1058,13 +1073,9 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
-                 break;
-             }
- 
--            /*
--             * The parent should never be NULL here but we want to handle
--             * corrupted documents gracefully.
--             */
--            if (cur->parent == NULL)
--                return;
--            cur = cur->parent;
-+            cur = parent;
-+            /* cur->parent was validated when descending. */
-+            parent = cur->parent;
- 
-             if (cur->type == XML_ELEMENT_NODE) {
-                 if (ctxt->level > 0) ctxt->level--;
--- 
-GitLab


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/libxml2/files/
@ 2023-05-22 21:27 Conrad Kostecki
  0 siblings, 0 replies; 5+ messages in thread
From: Conrad Kostecki @ 2023-05-22 21:27 UTC (permalink / raw
  To: gentoo-commits

commit:     6fdccd045b03de7c09a8486f16dc72fdf9ff2525
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Mon May 22 17:14:59 2023 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Mon May 22 21:26:31 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6fdccd04

dev-libs/libxml2: remove unused patches

Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/31129
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 .../libxml2/files/libxml2-2.11.2-0001-iconv.patch  |  63 ------
 .../libxml2-2.11.2-0002-crash-old-libxslt.patch    |  27 ---
 .../files/libxml2-2.11.2-0003-no-xpath.patch       | 245 ---------------------
 .../files/libxml2-2.11.2-0004-huge-push.patch      |  27 ---
 .../files/libxml2-2.11.2-0005-icu-detection.patch  |  21 --
 5 files changed, 383 deletions(-)

diff --git a/dev-libs/libxml2/files/libxml2-2.11.2-0001-iconv.patch b/dev-libs/libxml2/files/libxml2-2.11.2-0001-iconv.patch
deleted file mode 100644
index 615f413c4419..000000000000
--- a/dev-libs/libxml2/files/libxml2-2.11.2-0001-iconv.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-https://gitlab.gnome.org/GNOME/libxml2/-/commit/9c1f5fe7fbad2b57149c628802c4ded3e4f3d284
-
-From 9c1f5fe7fbad2b57149c628802c4ded3e4f3d284 Mon Sep 17 00:00:00 2001
-From: Mike Dalessio <mike.dalessio@gmail.com>
-Date: Fri, 5 May 2023 17:34:57 -0400
-Subject: [PATCH] autoconf: fix iconv library paths
-
-and pass cflags when building executables
-
-See 0f77167f for prior related work
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -145,11 +145,12 @@ runsuite_DEPENDENCIES = $(DEPS)
- runsuite_LDADD= $(LDADDS)
- 
- xmllint_SOURCES=xmllint.c
--xmllint_CFLAGS = $(AM_CFLAGS) $(RDL_CFLAGS)
-+xmllint_CFLAGS = $(AM_CFLAGS) $(RDL_CFLAGS) $(ICONV_CFLAGS)
- xmllint_DEPENDENCIES = $(DEPS)
- xmllint_LDADD=  $(RDL_LIBS) $(LDADDS)
- 
- xmlcatalog_SOURCES=xmlcatalog.c
-+xmlcatalog_CFLAGS = $(AM_CFLAGS) $(RDL_CFLAGS) $(ICONV_CFLAGS)
- xmlcatalog_DEPENDENCIES = $(DEPS)
- xmlcatalog_LDADD = $(RDL_LIBS) $(LDADDS)
- 
---- a/configure.ac
-+++ b/configure.ac
-@@ -1036,7 +1036,7 @@ else
-     if test "$with_iconv" != "yes" && test "$with_iconv" != "" ; then
- 	ICONV_DIR=$with_iconv
- 	CPPFLAGS="$CPPFLAGS -I$ICONV_DIR/include"
--        LIBS="$LIBS -L$ICONV_DIR/libs"
-+	LIBS="$LIBS -L$ICONV_DIR/lib"
- 	# Export this since our headers include iconv.h
- 	XML_INCLUDEDIR="$XML_INCLUDEDIR -I$ICONV_DIR/include"
-     fi
-@@ -1052,12 +1052,13 @@ else
-                 ICONV_LIBS="-liconv"])])])
-     if test "$WITH_ICONV" = "1" && test "$ICONV_DIR" != ""; then
-         ICONV_CFLAGS="-I$ICONV_DIR/include"
--        ICONV_LIBS="-L$ICONV_DIR/libs $ICONV_LIBS"
-+        ICONV_LIBS="-L$ICONV_DIR/lib $ICONV_LIBS"
-     fi
-     CPPFLAGS=$_cppflags
-     LIBS=$_libs
- fi
- AC_SUBST(WITH_ICONV)
-+AC_SUBST(ICONV_CFLAGS)
- 
- dnl
- dnl Checks for ICU library.
-@@ -1100,7 +1101,7 @@ else
-                     ICU_LIBS=-licucore
-                     if test "$ICU_DIR" != ""; then
-                         ICU_CFLAGS="-I$ICU_DIR/include"
--                        ICU_LIBS="-L$ICU_DIR/libs $ICU_LIBS"
-+                        ICU_LIBS="-L$ICU_DIR/lib $ICU_LIBS"
-                     fi])])
-             CPPFLAGS=$_cppflags
-             LIBS=$_libs
--- 
-GitLab

diff --git a/dev-libs/libxml2/files/libxml2-2.11.2-0002-crash-old-libxslt.patch b/dev-libs/libxml2/files/libxml2-2.11.2-0002-crash-old-libxslt.patch
deleted file mode 100644
index 2253ea6211d1..000000000000
--- a/dev-libs/libxml2/files/libxml2-2.11.2-0002-crash-old-libxslt.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-https://gitlab.gnome.org/GNOME/libxml2/-/commit/e6a9cc8d66778c20435a46e50d4e5866deace5f6
-
-From e6a9cc8d66778c20435a46e50d4e5866deace5f6 Mon Sep 17 00:00:00 2001
-From: Nick Wellnhofer <wellnhofer@aevum.de>
-Date: Sat, 6 May 2023 15:28:13 +0200
-Subject: [PATCH] hash: Fix possible startup crash with old libxslt versions
-
-Call xmlInitParser in xmlHashCreate to make it work if the library
-wasn't initialized yet.
-
-Otherwise, exsltRegisterAll from libxslt 1.1.24 or older might cause
-a crash.
-
-See #534.
---- a/hash.c
-+++ b/hash.c
-@@ -180,6 +180,8 @@ xmlHashTablePtr
- xmlHashCreate(int size) {
-     xmlHashTablePtr table;
- 
-+    xmlInitParser();
-+
-     if (size <= 0)
-         size = 256;
- 
--- 
-GitLab

diff --git a/dev-libs/libxml2/files/libxml2-2.11.2-0003-no-xpath.patch b/dev-libs/libxml2/files/libxml2-2.11.2-0003-no-xpath.patch
deleted file mode 100644
index f036c5814f26..000000000000
--- a/dev-libs/libxml2/files/libxml2-2.11.2-0003-no-xpath.patch
+++ /dev/null
@@ -1,245 +0,0 @@
-https://gitlab.gnome.org/GNOME/libxml2/-/commit/41e78f8f8656b8e2206c06995da6bd8dcc82823d
-
-From 41e78f8f8656b8e2206c06995da6bd8dcc82823d Mon Sep 17 00:00:00 2001
-From: Nick Wellnhofer <wellnhofer@aevum.de>
-Date: Mon, 8 May 2023 23:12:33 +0200
-Subject: [PATCH] xpath: Fix build without LIBXML_XPATH_ENABLED
-
-Move static function declaration into XPATH block. Also move comparison
-functions.
-
-Fixes #537.
---- a/xpath.c
-+++ b/xpath.c
-@@ -145,6 +145,114 @@
-  * any use of the macros IS_ASCII_CHARACTER and IS_ASCII_DIGIT)
-  */
- 
-+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
-+
-+/************************************************************************
-+ *									*
-+ *			Floating point stuff				*
-+ *									*
-+ ************************************************************************/
-+
-+double xmlXPathNAN = 0.0;
-+double xmlXPathPINF = 0.0;
-+double xmlXPathNINF = 0.0;
-+
-+/**
-+ * xmlXPathInit:
-+ *
-+ * DEPRECATED: Alias for xmlInitParser.
-+ */
-+void
-+xmlXPathInit(void) {
-+    xmlInitParser();
-+}
-+
-+/**
-+ * xmlInitXPathInternal:
-+ *
-+ * Initialize the XPath environment
-+ */
-+ATTRIBUTE_NO_SANITIZE("float-divide-by-zero")
-+void
-+xmlInitXPathInternal(void) {
-+#if defined(NAN) && defined(INFINITY)
-+    xmlXPathNAN = NAN;
-+    xmlXPathPINF = INFINITY;
-+    xmlXPathNINF = -INFINITY;
-+#else
-+    /* MSVC doesn't allow division by zero in constant expressions. */
-+    double zero = 0.0;
-+    xmlXPathNAN = 0.0 / zero;
-+    xmlXPathPINF = 1.0 / zero;
-+    xmlXPathNINF = -xmlXPathPINF;
-+#endif
-+}
-+
-+/**
-+ * xmlXPathIsNaN:
-+ * @val:  a double value
-+ *
-+ * Returns 1 if the value is a NaN, 0 otherwise
-+ */
-+int
-+xmlXPathIsNaN(double val) {
-+#ifdef isnan
-+    return isnan(val);
-+#else
-+    return !(val == val);
-+#endif
-+}
-+
-+/**
-+ * xmlXPathIsInf:
-+ * @val:  a double value
-+ *
-+ * Returns 1 if the value is +Infinite, -1 if -Infinite, 0 otherwise
-+ */
-+int
-+xmlXPathIsInf(double val) {
-+#ifdef isinf
-+    return isinf(val) ? (val > 0 ? 1 : -1) : 0;
-+#else
-+    if (val >= xmlXPathPINF)
-+        return 1;
-+    if (val <= -xmlXPathPINF)
-+        return -1;
-+    return 0;
-+#endif
-+}
-+
-+#endif /* SCHEMAS or XPATH */
-+
-+#ifdef LIBXML_XPATH_ENABLED
-+
-+/*
-+ * TODO: when compatibility allows remove all "fake node libxslt" strings
-+ *       the test should just be name[0] = ' '
-+ */
-+#ifdef DEBUG_XPATH_EXPRESSION
-+#define DEBUG_STEP
-+#define DEBUG_EXPR
-+#define DEBUG_EVAL_COUNTS
-+#endif
-+
-+static xmlNs xmlXPathXMLNamespaceStruct = {
-+    NULL,
-+    XML_NAMESPACE_DECL,
-+    XML_XML_NAMESPACE,
-+    BAD_CAST "xml",
-+    NULL,
-+    NULL
-+};
-+static xmlNsPtr xmlXPathXMLNamespace = &xmlXPathXMLNamespaceStruct;
-+#ifndef LIBXML_THREAD_ENABLED
-+/*
-+ * Optimizer is disabled only when threaded apps are detected while
-+ * the library ain't compiled for thread safety.
-+ */
-+static int xmlXPathDisableOptimizer = 0;
-+#endif
-+
- static void
- xmlXPathNodeSetClear(xmlNodeSetPtr set, int hasNsNodes);
- 
-@@ -475,114 +583,6 @@ int wrap_cmp( xmlNodePtr x, xmlNodePtr y );
- #include "timsort.h"
- #endif /* WITH_TIM_SORT */
- 
--#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
--
--/************************************************************************
-- *									*
-- *			Floating point stuff				*
-- *									*
-- ************************************************************************/
--
--double xmlXPathNAN = 0.0;
--double xmlXPathPINF = 0.0;
--double xmlXPathNINF = 0.0;
--
--/**
-- * xmlXPathInit:
-- *
-- * DEPRECATED: Alias for xmlInitParser.
-- */
--void
--xmlXPathInit(void) {
--    xmlInitParser();
--}
--
--/**
-- * xmlInitXPathInternal:
-- *
-- * Initialize the XPath environment
-- */
--ATTRIBUTE_NO_SANITIZE("float-divide-by-zero")
--void
--xmlInitXPathInternal(void) {
--#if defined(NAN) && defined(INFINITY)
--    xmlXPathNAN = NAN;
--    xmlXPathPINF = INFINITY;
--    xmlXPathNINF = -INFINITY;
--#else
--    /* MSVC doesn't allow division by zero in constant expressions. */
--    double zero = 0.0;
--    xmlXPathNAN = 0.0 / zero;
--    xmlXPathPINF = 1.0 / zero;
--    xmlXPathNINF = -xmlXPathPINF;
--#endif
--}
--
--/**
-- * xmlXPathIsNaN:
-- * @val:  a double value
-- *
-- * Returns 1 if the value is a NaN, 0 otherwise
-- */
--int
--xmlXPathIsNaN(double val) {
--#ifdef isnan
--    return isnan(val);
--#else
--    return !(val == val);
--#endif
--}
--
--/**
-- * xmlXPathIsInf:
-- * @val:  a double value
-- *
-- * Returns 1 if the value is +Infinite, -1 if -Infinite, 0 otherwise
-- */
--int
--xmlXPathIsInf(double val) {
--#ifdef isinf
--    return isinf(val) ? (val > 0 ? 1 : -1) : 0;
--#else
--    if (val >= xmlXPathPINF)
--        return 1;
--    if (val <= -xmlXPathPINF)
--        return -1;
--    return 0;
--#endif
--}
--
--#endif /* SCHEMAS or XPATH */
--
--#ifdef LIBXML_XPATH_ENABLED
--
--/*
-- * TODO: when compatibility allows remove all "fake node libxslt" strings
-- *       the test should just be name[0] = ' '
-- */
--#ifdef DEBUG_XPATH_EXPRESSION
--#define DEBUG_STEP
--#define DEBUG_EXPR
--#define DEBUG_EVAL_COUNTS
--#endif
--
--static xmlNs xmlXPathXMLNamespaceStruct = {
--    NULL,
--    XML_NAMESPACE_DECL,
--    XML_XML_NAMESPACE,
--    BAD_CAST "xml",
--    NULL,
--    NULL
--};
--static xmlNsPtr xmlXPathXMLNamespace = &xmlXPathXMLNamespaceStruct;
--#ifndef LIBXML_THREAD_ENABLED
--/*
-- * Optimizer is disabled only when threaded apps are detected while
-- * the library ain't compiled for thread safety.
-- */
--static int xmlXPathDisableOptimizer = 0;
--#endif
--
- /************************************************************************
-  *									*
-  *			Error handling routines				*
--- 
-GitLab

diff --git a/dev-libs/libxml2/files/libxml2-2.11.2-0004-huge-push.patch b/dev-libs/libxml2/files/libxml2-2.11.2-0004-huge-push.patch
deleted file mode 100644
index 5f3d06038271..000000000000
--- a/dev-libs/libxml2/files/libxml2-2.11.2-0004-huge-push.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-https://gitlab.gnome.org/GNOME/libxml2/-/commit/7c14859d0779797a93ea75744266425028599944
-
-From 7c14859d0779797a93ea75744266425028599944 Mon Sep 17 00:00:00 2001
-From: Nick Wellnhofer <wellnhofer@aevum.de>
-Date: Tue, 9 May 2023 13:28:06 +0200
-Subject: [PATCH] parser: Fix "huge input lookup" error with push parser
-
-Fix parsing of larger documents without XML_PARSE_HUGE.
-
-Should fix #538.
---- a/parserInternals.c
-+++ b/parserInternals.c
-@@ -418,9 +418,10 @@ xmlParserShrink(xmlParserCtxtPtr ctxt) {
-     xmlParserInputBufferPtr buf = in->buf;
-     size_t used;
- 
--    /* Don't shrink memory buffers. */
-+    /* Don't shrink pull parser memory buffers. */
-     if ((buf == NULL) ||
--        ((buf->encoder == NULL) && (buf->readcallback == NULL)))
-+        ((ctxt->progressive == 0) &&
-+         (buf->encoder == NULL) && (buf->readcallback == NULL)))
-         return;
- 
-     used = in->cur - in->base;
--- 
-GitLab

diff --git a/dev-libs/libxml2/files/libxml2-2.11.2-0005-icu-detection.patch b/dev-libs/libxml2/files/libxml2-2.11.2-0005-icu-detection.patch
deleted file mode 100644
index 6fffb156ea9c..000000000000
--- a/dev-libs/libxml2/files/libxml2-2.11.2-0005-icu-detection.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-https://gitlab.gnome.org/GNOME/libxml2/-/commit/55f221a4c57903ced5721008607d4133d6eb51cf
-
-From 55f221a4c57903ced5721008607d4133d6eb51cf Mon Sep 17 00:00:00 2001
-From: Nick Wellnhofer <wellnhofer@aevum.de>
-Date: Wed, 10 May 2023 18:13:47 +0200
-Subject: [PATCH] autotools: Fix ICU detection
-
-Fixes #540.
---- a/configure.ac
-+++ b/configure.ac
-@@ -1096,7 +1096,7 @@ else
-             fi
- 
-             AC_CHECK_HEADER(unicode/ucnv.h, [
--                AC_CHECK_LIB([icucore], [uconv_open], [
-+                AC_CHECK_LIB([icucore], [ucnv_open], [
-                     WITH_ICU=1
-                     ICU_LIBS=-licucore
-                     if test "$ICU_DIR" != ""; then
--- 
-GitLab


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/libxml2/files/
@ 2023-12-31  2:38 Conrad Kostecki
  0 siblings, 0 replies; 5+ messages in thread
From: Conrad Kostecki @ 2023-12-31  2:38 UTC (permalink / raw
  To: gentoo-commits

commit:     9f7cd2c69e7de171c9c9877b655e9da7b3c2cad6
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Fri Dec 29 14:03:51 2023 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sun Dec 31 02:37:13 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f7cd2c6

dev-libs/libxml2: remove unused patch

Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/34538
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 .../libxml2-2.10.3-python3-unicode-errors.patch    | 35 ----------------------
 1 file changed, 35 deletions(-)

diff --git a/dev-libs/libxml2/files/libxml2-2.10.3-python3-unicode-errors.patch b/dev-libs/libxml2/files/libxml2-2.10.3-python3-unicode-errors.patch
deleted file mode 100644
index 525e1fe36c0b..000000000000
--- a/dev-libs/libxml2/files/libxml2-2.10.3-python3-unicode-errors.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-https://bugs.gentoo.org/745162
-https://gitlab.gnome.org/GNOME/libxml2/-/issues/64
-
---- a/python/libxml.c
-+++ b/python/libxml.c
-@@ -1620,6 +1620,7 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU
-     PyObject *message;
-     PyObject *result;
-     char str[1000];
-+    unsigned char *ptr = (unsigned char *)str;
- 
- #ifdef DEBUG_ERROR
-     printf("libxml_xmlErrorFuncHandler(%p, %s, ...) called\n", ctx, msg);
-@@ -1636,12 +1637,20 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU
- 	    str[999] = 0;
-         va_end(ap);
- 
-+#if PY_MAJOR_VERSION >= 3
-+        /* Ensure the error string doesn't start at UTF8 continuation. */
-+        while (*ptr && (*ptr & 0xc0) == 0x80)
-+            ptr++;
-+#endif
-+
-         list = PyTuple_New(2);
-         PyTuple_SetItem(list, 0, libxml_xmlPythonErrorFuncCtxt);
-         Py_XINCREF(libxml_xmlPythonErrorFuncCtxt);
--        message = libxml_charPtrConstWrap(str);
-+        message = libxml_charPtrConstWrap(ptr);
-         PyTuple_SetItem(list, 1, message);
-         result = PyEval_CallObject(libxml_xmlPythonErrorFuncHandler, list);
-+        /* Forget any errors caused in the error handler. */
-+        PyErr_Clear();
-         Py_XDECREF(list);
-         Py_XDECREF(result);
-     }


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-12-31  2:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-11 13:31 [gentoo-commits] repo/gentoo:master commit in: dev-libs/libxml2/files/ Mart Raudsepp
  -- strict thread matches above, loose matches on Subject: below --
2021-04-18  1:38 Sam James
2021-05-20  2:23 Sam James
2023-05-22 21:27 Conrad Kostecki
2023-12-31  2:38 Conrad Kostecki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox