mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-26 00:37:43 +03:00
parser: Set depth limit to 2048 with XML_PARSE_HUGE
Deeply nested documents can cause performance problems, so the nesting depth should always be limited to a reasonable value. Also remove the global xmlParserMaxDepth setting which isn't thread-safe and seems unused.
This commit is contained in:
@@ -25,11 +25,14 @@ extern "C" {
|
||||
/**
|
||||
* xmlParserMaxDepth:
|
||||
*
|
||||
* DEPRECATED: has no effect
|
||||
*
|
||||
* arbitrary depth limit for the XML documents that we allow to
|
||||
* process. This is not a limitation of the parser but a safety
|
||||
* boundary feature, use XML_PARSE_HUGE option to override it.
|
||||
*/
|
||||
XMLPUBVAR unsigned int xmlParserMaxDepth;
|
||||
XML_DEPRECATED
|
||||
XMLPUBVAR const unsigned int xmlParserMaxDepth;
|
||||
|
||||
/**
|
||||
* XML_MAX_TEXT_LENGTH:
|
||||
|
||||
Reference in New Issue
Block a user