diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2023-05-06 15:28:13 +0200 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2023-05-06 15:28:13 +0200 |
commit | 06a2c251a18d8cc93bcae82270997b27cbc9aaea (patch) | |
tree | 5fc77e2546d278cbc47d670dde728184cb38dfc4 | |
parent | a800b7e058b09031aba92949eecf2c76fa030635 (diff) | |
download | libxml2-06a2c251a18d8cc93bcae82270997b27cbc9aaea.tar.gz |
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.
-rw-r--r-- | hash.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -180,6 +180,8 @@ xmlHashTablePtr xmlHashCreate(int size) { xmlHashTablePtr table; + xmlInitParser(); + if (size <= 0) size = 256; |