加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
backport-hash-Fix-possible-startup-crash-with-old-libxslt-ver.patch 825 Bytes
一键复制 编辑 原始数据 按行查看 历史
冉召宇 提交于 2024-04-25 19:13 . libxml2切openEuler7.0
From 06a2c251a18d8cc93bcae82270997b27cbc9aaea Mon Sep 17 00:00:00 2001
From: Nick Wellnhofer <wellnhofer@aevum.de>
Date: Sat, 6 May 2023 15:28:13 +0200
Subject: [PATCH] hash: Fix possible startup crash with old libxslt versions
Call xmlInitParser in xmlHashCreate to make it work if the library
wasn't initialized yet.
Otherwise, exsltRegisterAll from libxslt 1.1.24 or older might cause
a crash.
See #534.
Reference:https://github.com/GNOME/libxml2/commit/06a2c251a18d8cc93bcae82270997b27cbc9aaea
Conflict:NA
---
hash.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hash.c b/hash.c
index 00250ba..ac868ff 100644
--- a/hash.c
+++ b/hash.c
@@ -181,6 +181,8 @@ xmlHashTablePtr
xmlHashCreate(int size) {
xmlHashTablePtr table;
+ xmlInitParser();
+
if (size <= 0)
size = 256;
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化