1 Star 0 Fork 37

catherine / libxml2_oe

forked from src-openEuler / libxml2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Fix-memory-leak-in-xmlXIncludeLoadDoc-error-path.patch 949 Bytes
一键复制 编辑 原始数据 按行查看 历史
From ff009f991314ce8711f8a6a7f99107c10fb0a807 Mon Sep 17 00:00:00 2001
From: Nick Wellnhofer <wellnhofer@aevum.de>
Date: Sat, 30 May 2020 15:32:25 +0200
Subject: [PATCH 042/139] Fix memory leak in xmlXIncludeLoadDoc error path
Found by OSS-Fuzz.
---
xinclude.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/xinclude.c b/xinclude.c
index 5d44df4..baeb8db 100644
--- a/xinclude.c
+++ b/xinclude.c
@@ -1608,6 +1608,7 @@ loaded:
XML_XINCLUDE_XPTR_RESULT,
"XPointer is not a range: #%s\n",
fragment);
+ xmlXPathFreeObject(xptr);
xmlXPathFreeContext(xptrctxt);
xmlFree(URL);
xmlFree(fragment);
@@ -1615,6 +1616,7 @@ loaded:
case XPATH_NODESET:
if ((xptr->nodesetval == NULL) ||
(xptr->nodesetval->nodeNr <= 0)) {
+ xmlXPathFreeObject(xptr);
xmlXPathFreeContext(xptrctxt);
xmlFree(URL);
xmlFree(fragment);
--
1.8.3.1
1
https://gitee.com/catherine_56/libxml2_oe.git
git@gitee.com:catherine_56/libxml2_oe.git
catherine_56
libxml2_oe
libxml2_oe
openEuler-20.03-LTS

搜索帮助