5 Star 6 Fork 47

OpenHarmony/third_party_libxml2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
backport-parser-Don-t-increase-depth-twice-when-parsing-internal.patch 937 Bytes
一键复制 编辑 原始数据 按行查看 历史
冉召宇 提交于 2024-04-25 19:13 . libxml2切openEuler7.0
From dd62e541ecd142ebfb16cb7abe3d3ef4ee6617bd Mon Sep 17 00:00:00 2001
From: Nick Wellnhofer <[email protected]>
Date: Fri, 23 Dec 2022 21:53:30 +0100
Subject: [PATCH] parser: Don't increase depth twice when parsing internal
entities
Fix xmlParseBalancedChunkMemoryInternal.
Reference:https://github.com/GNOME/libxml2/commit/dd62e541ecd142ebfb16cb7abe3d3ef4ee6617bd
Conflict:NA
---
parser.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/parser.c b/parser.c
index 431851f..9127deb 100644
--- a/parser.c
+++ b/parser.c
@@ -13388,7 +13388,7 @@ xmlParseBalancedChunkMemoryInternal(xmlParserCtxtPtr oldctxt,
xmlAddChild((xmlNodePtr) ctxt->myDoc, newRoot);
nodePush(ctxt, ctxt->myDoc->children);
ctxt->instate = XML_PARSER_CONTENT;
- ctxt->depth = oldctxt->depth + 1;
+ ctxt->depth = oldctxt->depth;
ctxt->validate = 0;
ctxt->loadsubset = oldctxt->loadsubset;
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openharmony/third_party_libxml2.git
[email protected]:openharmony/third_party_libxml2.git
openharmony
third_party_libxml2
third_party_libxml2
master

搜索帮助