pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/textproc libxml2: update to 2.9.12



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4600ea635961
branches:  trunk
changeset: 453128:4600ea635961
user:      nia <nia%pkgsrc.org@localhost>
date:      Sun May 23 19:31:47 2021 +0000

description:
libxml2: update to 2.9.12

2.9.12:
"Brown paper bag release, some recently added sources were missing from
the 2.9.11 tarball."

2.9.11:
"Prompted by CVE-2021-3541, but this includes an awful lot of serious bug
fixes by Nick and others."

diffstat:

 textproc/libxml2/Makefile                      |   3 +-
 textproc/libxml2/Makefile.common               |   7 +--
 textproc/libxml2/distinfo                      |  10 ++--
 textproc/libxml2/patches/patch-parser.c        |  38 -------------------
 textproc/libxml2/patches/patch-python-types.c  |  52 --------------------------
 textproc/libxml2/patches/patch-python_libxml.c |  51 -------------------------
 textproc/libxml2/patches/patch-xmlschemas.c    |  39 -------------------
 textproc/py-libxml2/Makefile                   |   3 +-
 8 files changed, 10 insertions(+), 193 deletions(-)

diffs (256 lines):

diff -r 4f50ac9d4627 -r 4600ea635961 textproc/libxml2/Makefile
--- a/textproc/libxml2/Makefile Sun May 23 19:09:18 2021 +0000
+++ b/textproc/libxml2/Makefile Sun May 23 19:31:47 2021 +0000
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.158 2021/04/21 11:40:41 adam Exp $
+# $NetBSD: Makefile,v 1.159 2021/05/23 19:31:47 nia Exp $
 
 .include "../../textproc/libxml2/Makefile.common"
-PKGREVISION=   4
 
 COMMENT=       XML parser library from the GNOME project
 LICENSE=       modified-bsd
diff -r 4f50ac9d4627 -r 4600ea635961 textproc/libxml2/Makefile.common
--- a/textproc/libxml2/Makefile.common  Sun May 23 19:09:18 2021 +0000
+++ b/textproc/libxml2/Makefile.common  Sun May 23 19:31:47 2021 +0000
@@ -1,12 +1,11 @@
-# $NetBSD: Makefile.common,v 1.13 2019/11/06 13:19:43 wiz Exp $
+# $NetBSD: Makefile.common,v 1.14 2021/05/23 19:31:47 nia Exp $
 #
 # used by textproc/libxml2/Makefile
 # used by textproc/py-libxml2/Makefile
 
-DISTNAME=      libxml2-2.9.10
+DISTNAME=      libxml2-2.9.12
 CATEGORIES=    textproc
-MASTER_SITES=  ftp://xmlsoft.org/libxml2/
-MASTER_SITES+= http://xmlsoft.org/sources/
+MASTER_SITES=  http://xmlsoft.org/sources/
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=      http://xmlsoft.org/
diff -r 4f50ac9d4627 -r 4600ea635961 textproc/libxml2/distinfo
--- a/textproc/libxml2/distinfo Sun May 23 19:09:18 2021 +0000
+++ b/textproc/libxml2/distinfo Sun May 23 19:31:47 2021 +0000
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.134 2020/11/08 23:31:44 js Exp $
+$NetBSD: distinfo,v 1.135 2021/05/23 19:31:47 nia Exp $
 
-SHA1 (libxml2-2.9.10.tar.gz) = db6592ec9ca9708c4e71bf6bfd907bbb5cd40644
-RMD160 (libxml2-2.9.10.tar.gz) = 455f81e1f121c63dac96802de7f83ce4483f1afe
-SHA512 (libxml2-2.9.10.tar.gz) = 0adfd12bfde89cbd6296ba6e66b6bed4edb814a74b4265bda34d95c41d9d92c696ee7adb0c737aaf9cc6e10426a31a35079b2a23d26c074e299858da12c072ed
-Size (libxml2-2.9.10.tar.gz) = 5624761 bytes
+SHA1 (libxml2-2.9.12.tar.gz) = 339fe5bb2a7d0c13f068c26d8f7cd194c13f9a2a
+RMD160 (libxml2-2.9.12.tar.gz) = 766b9460b9e62b8152f431747c30c88c868c0c7e
+SHA512 (libxml2-2.9.12.tar.gz) = df1c6486e80f0fcf3c506f3599bcfb94b620c00d0b5d26831bc983daa78d58ec58b5057b1ec7c1a26c694f40199c6234ee2a6dcabf65abfa10c447cb5705abbd
+Size (libxml2-2.9.12.tar.gz) = 5681632 bytes
 SHA1 (patch-Makefile.in) = e687eaa9805b855b0c8a944ec5c597bd34954472
 SHA1 (patch-catalog.c) = 34afe787f6012b460a85be993048e133907a1621
 SHA1 (patch-configure) = f6e9f08377a537657df08deee17a5cc66c60b808
diff -r 4f50ac9d4627 -r 4600ea635961 textproc/libxml2/patches/patch-parser.c
--- a/textproc/libxml2/patches/patch-parser.c   Sun May 23 19:09:18 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-$NetBSD: patch-parser.c,v 1.7 2020/01/24 10:40:36 kim Exp $
-
-Fix CVE-2020-7595
-
-https://gitlab.gnome.org/GNOME/libxml2/commit/0e1a49c89076.patch
-
-From 0e1a49c8907645d2e155f0d89d4d9895ac5112b5 Mon Sep 17 00:00:00 2001
-From: Zhipeng Xie <xiezhipeng1%huawei.com@localhost>
-Date: Thu, 12 Dec 2019 17:30:55 +0800
-Subject: [PATCH] Fix infinite loop in xmlStringLenDecodeEntities
-
-When ctxt->instate == XML_PARSER_EOF,xmlParseStringEntityRef
-return NULL which cause a infinite loop in xmlStringLenDecodeEntities
-
-Found with libFuzzer.
-
-Signed-off-by: Zhipeng Xie <xiezhipeng1%huawei.com@localhost>
----
- parser.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/parser.c b/parser.c
-index d1c31963..a34bb6cd 100644
---- parser.c
-+++ parser.c
-@@ -2646,7 +2646,8 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
-     else
-         c = 0;
-     while ((c != 0) && (c != end) && /* non input consuming loop */
--         (c != end2) && (c != end3)) {
-+           (c != end2) && (c != end3) &&
-+           (ctxt->instate != XML_PARSER_EOF)) {
- 
-       if (c == 0) break;
-         if ((c == '&') && (str[1] == '#')) {
--- 
-2.24.1
-
diff -r 4f50ac9d4627 -r 4600ea635961 textproc/libxml2/patches/patch-python-types.c
--- a/textproc/libxml2/patches/patch-python-types.c     Sun May 23 19:09:18 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-$NetBSD: patch-python-types.c,v 1.1 2020/11/08 23:31:44 js Exp $
-
-Fix compilation with Python 3.9.
-
---- python/types.c.orig        2019-10-22 18:46:01.000000000 +0000
-+++ python/types.c
-@@ -602,16 +602,16 @@ libxml_xmlXPathObjectPtrConvert(PyObject
-     if (obj == NULL) {
-         return (NULL);
-     }
--    if PyFloat_Check (obj) {
-+    if (PyFloat_Check (obj)) {
-         ret = xmlXPathNewFloat((double) PyFloat_AS_DOUBLE(obj));
--    } else if PyLong_Check(obj) {
-+    } else if (PyLong_Check(obj)) {
- #ifdef PyLong_AS_LONG
-         ret = xmlXPathNewFloat((double) PyLong_AS_LONG(obj));
- #else
-         ret = xmlXPathNewFloat((double) PyInt_AS_LONG(obj));
- #endif
- #ifdef PyBool_Check
--    } else if PyBool_Check (obj) {
-+    } else if (PyBool_Check (obj)) {
- 
-         if (obj == Py_True) {
-           ret = xmlXPathNewBoolean(1);
-@@ -620,14 +620,14 @@ libxml_xmlXPathObjectPtrConvert(PyObject
-           ret = xmlXPathNewBoolean(0);
-         }
- #endif
--    } else if PyBytes_Check (obj) {
-+    } else if (PyBytes_Check (obj)) {
-         xmlChar *str;
- 
-         str = xmlStrndup((const xmlChar *) PyBytes_AS_STRING(obj),
-                          PyBytes_GET_SIZE(obj));
-         ret = xmlXPathWrapString(str);
- #ifdef PyUnicode_Check
--    } else if PyUnicode_Check (obj) {
-+    } else if (PyUnicode_Check (obj)) {
- #if PY_VERSION_HEX >= 0x03030000
-         xmlChar *str;
-       const char *tmp;
-@@ -650,7 +650,7 @@ libxml_xmlXPathObjectPtrConvert(PyObject
-       ret = xmlXPathWrapString(str);
- #endif
- #endif
--    } else if PyList_Check (obj) {
-+    } else if (PyList_Check (obj)) {
-         int i;
-         PyObject *node;
-         xmlNodePtr cur;
diff -r 4f50ac9d4627 -r 4600ea635961 textproc/libxml2/patches/patch-python_libxml.c
--- a/textproc/libxml2/patches/patch-python_libxml.c    Sun May 23 19:09:18 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-$NetBSD: patch-python_libxml.c,v 1.2 2020/11/08 23:31:44 js Exp $
-
-Avoid returning invalid UTF-8 strings to python.
-Based on https://bugzilla.opensuse.org/attachment.cgi?id=746044&action=edit
-Fixes https://github.com/itstool/itstool/issues/22
-Fix compilation with Python 3.9.
-
---- python/libxml.c.orig       2019-10-22 18:46:01.000000000 +0000
-+++ python/libxml.c
-@@ -294,7 +294,7 @@ xmlPythonFileReadRaw (void * context, ch
-       lenread = PyBytes_Size(ret);
-       data = PyBytes_AsString(ret);
- #ifdef PyUnicode_Check
--    } else if PyUnicode_Check (ret) {
-+    } else if (PyUnicode_Check (ret)) {
- #if PY_VERSION_HEX >= 0x03030000
-         Py_ssize_t size;
-       const char *tmp;
-@@ -359,7 +359,7 @@ xmlPythonFileRead (void * context, char 
-       lenread = PyBytes_Size(ret);
-       data = PyBytes_AsString(ret);
- #ifdef PyUnicode_Check
--    } else if PyUnicode_Check (ret) {
-+    } else if (PyUnicode_Check (ret)) {
- #if PY_VERSION_HEX >= 0x03030000
-         Py_ssize_t size;
-       const char *tmp;
-@@ -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,10 +1637,14 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU
-           str[999] = 0;
-         va_end(ap);
- 
-+        /* Ensure the error string doesn't start at UTF8 continuation. */
-+        while (*ptr && (*ptr & 0xc0) == 0x80)
-+          ptr++;
-+
-         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);
-         Py_XDECREF(list);
diff -r 4f50ac9d4627 -r 4600ea635961 textproc/libxml2/patches/patch-xmlschemas.c
--- a/textproc/libxml2/patches/patch-xmlschemas.c       Sun May 23 19:09:18 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-$NetBSD: patch-xmlschemas.c,v 1.1 2020/01/24 10:40:36 kim Exp $
-
-Fix CVE-2019-20388
-
-https://gitlab.gnome.org/GNOME/libxml2/merge_requests/68.patch
-
-From 6088a74bcf7d0c42e24cff4594d804e1d3c9fbca Mon Sep 17 00:00:00 2001
-From: Zhipeng Xie <xiezhipeng1%huawei.com@localhost>
-Date: Tue, 20 Aug 2019 16:33:06 +0800
-Subject: [PATCH] Fix memory leak in xmlSchemaValidateStream
-
-When ctxt->schema is NULL, xmlSchemaSAXPlug->xmlSchemaPreRun
-alloc a new schema for ctxt->schema and set vctxt->xsiAssemble
-to 1. Then xmlSchemaVStart->xmlSchemaPreRun initialize
-vctxt->xsiAssemble to 0 again which cause the alloced schema
-can not be freed anymore.
-
-Found with libFuzzer.
-
-Signed-off-by: Zhipeng Xie <xiezhipeng1%huawei.com@localhost>
----
- xmlschemas.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/xmlschemas.c b/xmlschemas.c
-index 301c8449..39d92182 100644
---- xmlschemas.c
-+++ xmlschemas.c
-@@ -28090,7 +28090,6 @@ xmlSchemaPreRun(xmlSchemaValidCtxtPtr vctxt) {
-     vctxt->nberrors = 0;
-     vctxt->depth = -1;
-     vctxt->skipDepth = -1;
--    vctxt->xsiAssemble = 0;
-     vctxt->hasKeyrefs = 0;
- #ifdef ENABLE_IDC_NODE_TABLES_TEST
-     vctxt->createIDCNodeTables = 1;
--- 
-2.24.1
-
diff -r 4f50ac9d4627 -r 4600ea635961 textproc/py-libxml2/Makefile
--- a/textproc/py-libxml2/Makefile      Sun May 23 19:09:18 2021 +0000
+++ b/textproc/py-libxml2/Makefile      Sun May 23 19:31:47 2021 +0000
@@ -1,6 +1,5 @@
-# $NetBSD: Makefile,v 1.67 2021/04/21 11:42:48 adam Exp $
+# $NetBSD: Makefile,v 1.68 2021/05/23 19:31:47 nia Exp $
 
-PKGREVISION= 3
 .include "../../textproc/libxml2/Makefile.common"
 
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}



Home | Main Index | Thread Index | Old Index