From 06a2c251a18d8cc93bcae82270997b27cbc9aaea Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Sat, 6 May 2023 15:28:13 +0200 Subject: 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. --- hash.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hash.c b/hash.c index 479ff467..cbcc4293 100644 --- a/hash.c +++ b/hash.c @@ -180,6 +180,8 @@ xmlHashTablePtr xmlHashCreate(int size) { xmlHashTablePtr table; + xmlInitParser(); + if (size <= 0) size = 256; -- cgit v1.2.1