libxml2-2.11.5
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
https://gitlab.gnome.org/GNOME/libxml2/-/issues/583
|
||||
https://gitlab.gnome.org/GNOME/libxml2/-/commit/d39f78069dff496ec865c73aa44d7110e429bce9
|
||||
https://bugs.gentoo.org/915351
|
||||
|
||||
From d39f78069dff496ec865c73aa44d7110e429bce9 Mon Sep 17 00:00:00 2001
|
||||
From: Nick Wellnhofer <wellnhofer@aevum.de>
|
||||
Date: Wed, 23 Aug 2023 20:24:24 +0200
|
||||
Subject: [PATCH] tree: Fix copying of DTDs
|
||||
|
||||
- Don't create multiple DTD nodes.
|
||||
- Fix UAF if malloc fails.
|
||||
- Skip DTD nodes if tree module is disabled.
|
||||
|
||||
Fixes #583.
|
||||
--- a/tree.c
|
||||
+++ b/tree.c
|
||||
@@ -4471,29 +4471,28 @@ xmlNodePtr
|
||||
xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent) {
|
||||
xmlNodePtr ret = NULL;
|
||||
xmlNodePtr p = NULL,q;
|
||||
+ xmlDtdPtr newSubset = NULL;
|
||||
|
||||
while (node != NULL) {
|
||||
-#ifdef LIBXML_TREE_ENABLED
|
||||
if (node->type == XML_DTD_NODE ) {
|
||||
- if (doc == NULL) {
|
||||
+#ifdef LIBXML_TREE_ENABLED
|
||||
+ if ((doc == NULL) || (doc->intSubset != NULL)) {
|
||||
node = node->next;
|
||||
continue;
|
||||
}
|
||||
- if (doc->intSubset == NULL) {
|
||||
- q = (xmlNodePtr) xmlCopyDtd( (xmlDtdPtr) node );
|
||||
- if (q == NULL) goto error;
|
||||
- q->doc = doc;
|
||||
- q->parent = parent;
|
||||
- doc->intSubset = (xmlDtdPtr) q;
|
||||
- xmlAddChild(parent, q);
|
||||
- } else {
|
||||
- q = (xmlNodePtr) doc->intSubset;
|
||||
- xmlAddChild(parent, q);
|
||||
- }
|
||||
- } else
|
||||
+ q = (xmlNodePtr) xmlCopyDtd( (xmlDtdPtr) node );
|
||||
+ if (q == NULL) goto error;
|
||||
+ q->doc = doc;
|
||||
+ q->parent = parent;
|
||||
+ newSubset = (xmlDtdPtr) q;
|
||||
+#else
|
||||
+ node = node->next;
|
||||
+ continue;
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
+ } else {
|
||||
q = xmlStaticCopyNode(node, doc, parent, 1);
|
||||
- if (q == NULL) goto error;
|
||||
+ if (q == NULL) goto error;
|
||||
+ }
|
||||
if (ret == NULL) {
|
||||
q->prev = NULL;
|
||||
ret = p = q;
|
||||
@@ -4505,6 +4504,8 @@ xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent) {
|
||||
}
|
||||
node = node->next;
|
||||
}
|
||||
+ if (newSubset != NULL)
|
||||
+ doc->intSubset = newSubset;
|
||||
return(ret);
|
||||
error:
|
||||
xmlFreeNodeList(ret);
|
||||
--
|
||||
GitLab
|
||||
@@ -12,7 +12,7 @@
|
||||
<IsA>library</IsA>
|
||||
<Summary>Version 2 of the library to manipulate XML files</Summary>
|
||||
<Description>Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform).</Description>
|
||||
<Archive sha1sum="bb5754302b08086e6824dfe350b61523b238a11e" type="tarxz">https://download.gnome.org/sources/libxml2/2.10/libxml2-2.10.4.tar.xz</Archive>
|
||||
<Archive sha1sum="0e450a086ce491d64db9fabe8e76a7b49b05c025" type="tarxz">https://download.gnome.org/sources/libxml2/2.11/libxml2-2.11.5.tar.xz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>python-devel</Dependency>
|
||||
<Dependency>python3-devel</Dependency>
|
||||
@@ -21,9 +21,9 @@
|
||||
<Dependency versionFrom="8.0.1">readline-devel</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<!-- <Patch level="1">fedora/libxml2-2.9.12-fix-lxml-corrupted-tree.patch</Patch> -->
|
||||
<Patch level="1">libxml2-2.11.5-CVE-2023-45322.patch</Patch>
|
||||
<!-- <Patch level="1">fedora/libxml2-2.9.12-fix-formatting-regression.patch</Patch> -->
|
||||
<Patch level="1">fedora/libxml2-2.9.8-python3-unicode-errors.patch</Patch>
|
||||
<!-- <Patch level="1">fedora/libxml2-2.9.8-python3-unicode-errors.patch</Patch> -->
|
||||
<!-- <Patch level="1">libxml2-2.9.11-disable-fuzz-tests.patch</Patch> --> -->
|
||||
</Patches>
|
||||
</Source>
|
||||
@@ -91,6 +91,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="19">
|
||||
<Date>2023-10-13</Date>
|
||||
<Version>2.11.5</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Mustafa Cinasal</Name>
|
||||
<Email>muscnsl@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="18">
|
||||
<Date>2023-04-11</Date>
|
||||
<Version>2.10.4</Version>
|
||||
|
||||
Reference in New Issue
Block a user