1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-25 10:50:08 +03:00

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.
This commit is contained in:
Nick Wellnhofer 2023-05-06 15:28:13 +02:00
parent a800b7e058
commit 06a2c251a1

2
hash.c
View File

@ -180,6 +180,8 @@ xmlHashTablePtr
xmlHashCreate(int size) {
xmlHashTablePtr table;
xmlInitParser();
if (size <= 0)
size = 256;