1From 06a2c251a18d8cc93bcae82270997b27cbc9aaea Mon Sep 17 00:00:00 2001
2From: Nick Wellnhofer <wellnhofer@aevum.de>
3Date: Sat, 6 May 2023 15:28:13 +0200
4Subject: [PATCH] hash: Fix possible startup crash with old libxslt versions
5
6Call xmlInitParser in xmlHashCreate to make it work if the library
7wasn't initialized yet.
8
9Otherwise, exsltRegisterAll from libxslt 1.1.24 or older might cause
10a crash.
11
12See #534.
13
14Reference:https://github.com/GNOME/libxml2/commit/06a2c251a18d8cc93bcae82270997b27cbc9aaea
15Conflict:NA
16
17---
18 hash.c | 2 ++
19 1 file changed, 2 insertions(+)
20
21diff --git a/hash.c b/hash.c
22index 00250ba..ac868ff 100644
23--- a/hash.c
24+++ b/hash.c
25@@ -181,6 +181,8 @@ xmlHashTablePtr
26 xmlHashCreate(int size) {
27     xmlHashTablePtr table;
28 
29+    xmlInitParser();
30+
31     if (size <= 0)
32         size = 256;
33 
34-- 
352.27.0
36
37