2.9.10-2 - Fix relaxed approach to nested documents on object disposal
Merges: #7 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1780573 Signed-off-by: Jan Pokorný <jpokorny@fedoraproject.org>
This commit is contained in:
parent
4f67b323d7
commit
365b07ecd5
33
fix-relaxed-approach-to-nested-documents.patch
Normal file
33
fix-relaxed-approach-to-nested-documents.patch
Normal file
@ -0,0 +1,33 @@
|
||||
From 0815302dee2b78139832c2080348086a0564836b Mon Sep 17 00:00:00 2001
|
||||
From: Nick Wellnhofer <wellnhofer@aevum.de>
|
||||
Date: Fri, 6 Dec 2019 12:27:29 +0100
|
||||
Subject: [PATCH] Fix freeing of nested documents
|
||||
|
||||
Apparently, some libxslt RVTs can contain nested document nodes, see
|
||||
issue #132. I'm not sure how this happens exactly but it can cause a
|
||||
segfault in xmlFreeNodeList after the changes in commit 0762c9b6.
|
||||
|
||||
Make sure not to touch the (nonexistent) `content` member of xmlDocs.
|
||||
---
|
||||
tree.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/tree.c b/tree.c
|
||||
index 070670f1..0d7fc98c 100644
|
||||
--- a/tree.c
|
||||
+++ b/tree.c
|
||||
@@ -3708,6 +3708,11 @@ xmlFreeNodeList(xmlNodePtr cur) {
|
||||
(cur->type != XML_XINCLUDE_START) &&
|
||||
(cur->type != XML_XINCLUDE_END) &&
|
||||
(cur->type != XML_ENTITY_REF_NODE) &&
|
||||
+ (cur->type != XML_DOCUMENT_NODE) &&
|
||||
+#ifdef LIBXML_DOCB_ENABLED
|
||||
+ (cur->type != XML_DOCB_DOCUMENT_NODE) &&
|
||||
+#endif
|
||||
+ (cur->type != XML_HTML_DOCUMENT_NODE) &&
|
||||
(cur->content != (xmlChar *) &(cur->properties))) {
|
||||
DICT_FREE(cur->content)
|
||||
}
|
||||
--
|
||||
2.22.0
|
||||
|
@ -1,6 +1,6 @@
|
||||
Name: libxml2
|
||||
Version: 2.9.10
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Library providing XML and HTML support
|
||||
|
||||
License: MIT
|
||||
@ -10,6 +10,7 @@ Patch0: libxml2-multilib.patch
|
||||
# Patch from openSUSE.
|
||||
# See: https://bugzilla.gnome.org/show_bug.cgi?id=789714
|
||||
Patch1: libxml2-2.9.8-python3-unicode-errors.patch
|
||||
Patch2: https://gitlab.gnome.org/GNOME/libxml2/commit/0815302dee2b78139832c2080348086a0564836b.patch#/fix-relaxed-approach-to-nested-documents.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: make
|
||||
@ -138,6 +139,9 @@ gzip -9 -c doc/libxml2-api.xml > doc/libxml2-api.xml.gz
|
||||
%{python3_sitearch}/libxml2mod.so
|
||||
|
||||
%changelog
|
||||
* Fri Jan 03 2020 Jan Pokorny <jpokorny@fedoraproject.org> - 2.9.10-2
|
||||
- Fix relaxed approach to nested documents on object disposal (#1780573)
|
||||
|
||||
* Fri Nov 01 2019 David King <amigadave@amigadave.com> - 2.9.10-1
|
||||
- Update to 2.9.10 (#1767151)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user