Index: Source/core/xml/parser/XMLDocumentParser.cpp |
diff --git a/Source/core/xml/parser/XMLDocumentParser.cpp b/Source/core/xml/parser/XMLDocumentParser.cpp |
index 816d9d396522efeb1f903498ca499d4103c1a624..72bb31ac61488b05d63b264702c889bc6581ce0a 100644 |
--- a/Source/core/xml/parser/XMLDocumentParser.cpp |
+++ b/Source/core/xml/parser/XMLDocumentParser.cpp |
@@ -734,6 +734,7 @@ PassRefPtr<XMLParserContext> XMLParserContext::createStringParser(xmlSAXHandlerP |
{ |
initializeLibXMLIfNecessary(); |
xmlParserCtxtPtr parser = xmlCreatePushParserCtxt(handlers, 0, 0, 0, 0); |
+ xmlCtxtUseOptions(parser, XML_PARSE_HUGE); |
parser->_private = userData; |
parser->replaceEntities = true; |
return adoptRef(new XMLParserContext(parser)); |
@@ -756,7 +757,8 @@ PassRefPtr<XMLParserContext> XMLParserContext::createMemoryParser(xmlSAXHandlerP |
// Set parser options. |
// XML_PARSE_NODICT: default dictionary option. |
// XML_PARSE_NOENT: force entities substitutions. |
- xmlCtxtUseOptions(parser, XML_PARSE_NODICT | XML_PARSE_NOENT); |
+ // XML_PARSE_HUGE: don't impose arbitrary limits on document size. |
+ xmlCtxtUseOptions(parser, XML_PARSE_NODICT | XML_PARSE_NOENT | XML_PARSE_HUGE); |
// Internal initialization |
parser->sax2 = 1; |