加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
backport-xinclude-Fix-memory-leak-when-fuzzing.patch 911 Bytes
一键复制 编辑 原始数据 按行查看 历史
冉召宇 提交于 2024-04-25 19:13 . libxml2切openEuler7.0
From 48c13bd5203b325deb670d5b69015e9adc40990f Mon Sep 17 00:00:00 2001
From: Nick Wellnhofer <wellnhofer@aevum.de>
Date: Sat, 29 Oct 2022 15:38:16 +0200
Subject: [PATCH 01/28] xinclude: Fix memory leak when fuzzing
This only affects the fuzzing build mode.
Reference: https://github.com/GNOME/libxml2/commit/075cee9e9f1bedb6b2ca87e73a952fb2e92da3c1
Conflict: xinclude.c:<xmlXIncludeDoProcess>
---
xinclude.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xinclude.c b/xinclude.c
index 8c14a68..6ee58cb 100644
--- a/xinclude.c
+++ b/xinclude.c
@@ -2424,7 +2424,7 @@ xmlXIncludeDoProcess(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr tree,
* of replacements.
*/
if (ctxt->incTotal >= 20)
- return(-1);
+ break;
#endif
ctxt->incTotal++;
xmlXIncludePreProcessNode(ctxt, cur);
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化