5 Star 6 Fork 47

OpenHarmony/third_party_libxml2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
backport-fix-xmlXPathParserContext-could-be-double-delete-in-.patch 834 Bytes
一键复制 编辑 原始数据 按行查看 历史
冉召宇 提交于 2024-04-25 19:13 . libxml2切openEuler7.0
From 74263eff5f6212afa2196022ecd2fbc39c6d3c36 Mon Sep 17 00:00:00 2001
From: jinsub ahn <[email protected]>
Date: Wed, 30 Mar 2022 06:02:31 +0000
Subject: [PATCH 206/300] fix: xmlXPathParserContext could be double-delete in
OOM case.
Reference:https://github.com/GNOME/libxml2/commit/74263eff5f6212afa2196022ecd2fbc39c6d3c36
Conflict:NA
---
xpath.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xpath.c b/xpath.c
index c2d8458..e79dcec 100644
--- a/xpath.c
+++ b/xpath.c
@@ -13895,7 +13895,7 @@ xmlXPathRunEval(xmlXPathParserContextPtr ctxt, int toBool)
xmlMalloc(10 * sizeof(xmlXPathObjectPtr));
if (ctxt->valueTab == NULL) {
xmlXPathPErrMemory(ctxt, "creating evaluation context\n");
- xmlFree(ctxt);
+ return(-1);
}
ctxt->valueNr = 0;
ctxt->valueMax = 10;
--
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

搜索帮助