[libxml2/2.9] Fix leak of xmlElementContent
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2/2.9] Fix leak of xmlElementContent
- Date: Wed, 20 Apr 2022 17:13:27 +0000 (UTC)
commit d2f48e211567454177e8a288782c3598d33995eb
Author: David Kilzer <ddkilzer apple com>
Date: Wed Apr 6 18:05:20 2022 -0700
Fix leak of xmlElementContent
* valid.c:
(xmlCopyDocElementContent):
- Set `tmp->parent` properly to fix a leak that occurs in
xmlFreeDocElementContent().
- Appears to be a regresion from cee2b3a5f1.
Found by OSS-Fuzz Issue 44509.
valid.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/valid.c b/valid.c
index 9684683a..ed3c8503 100644
--- a/valid.c
+++ b/valid.c
@@ -1052,6 +1052,7 @@ xmlCopyDocElementContent(xmlDocPtr doc, xmlElementContentPtr cur) {
tmp->type = cur->type;
tmp->ocur = cur->ocur;
prev->c2 = tmp;
+ tmp->parent = prev;
if (cur->name != NULL) {
if (dict)
tmp->name = xmlDictLookup(dict, cur->name, -1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]