From: Felipe Pena Date: Tue, 1 Dec 2009 02:05:28 +0000 (+0000) Subject: - Fixed bug #49660 (libxml 2.7.3+ limits text nodes to 10MB). (Felipe) X-Git-Tag: php-5.4.0alpha1~191^2~2315 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=71dd1dfd1628445a3a5def10c7dff18de430321b;p=php - Fixed bug #49660 (libxml 2.7.3+ limits text nodes to 10MB). (Felipe) - Added LIBXML_PARSEHUGE constant to overrides the maximum text size of a single text node when using libxml2.7.3+. (Kalle) [DOC] --- diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index 534138d679..86819c6e77 100644 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@ -621,6 +621,9 @@ static PHP_MINIT_FUNCTION(libxml) #if LIBXML_VERSION >= 20621 REGISTER_LONG_CONSTANT("LIBXML_COMPACT", XML_PARSE_COMPACT, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("LIBXML_NOXMLDECL", XML_SAVE_NO_DECL, CONST_CS | CONST_PERSISTENT); +#endif +#if LIBXML_VERSION >= 20703 + REGISTER_LONG_CONSTANT("LIBXML_PARSEHUGE", XML_PARSE_HUGE, CONST_CS | CONST_PERSISTENT); #endif REGISTER_LONG_CONSTANT("LIBXML_NOEMPTYTAG", LIBXML_SAVE_NOEMPTYTAG, CONST_CS | CONST_PERSISTENT); diff --git a/ext/soap/php_xml.c b/ext/soap/php_xml.c index 401f37e3fa..1432742dc9 100644 --- a/ext/soap/php_xml.c +++ b/ext/soap/php_xml.c @@ -146,6 +146,9 @@ xmlDocPtr soap_xmlParseMemory(const void *buf, size_t buf_size) ctxt->sax->warning = NULL; ctxt->sax->error = NULL; /*ctxt->sax->fatalError = NULL;*/ +#if LIBXML_VERSION >= 20703 + ctxt->options |= XML_PARSE_HUGE; +#endif xmlParseDocument(ctxt); if (ctxt->wellFormed) { ret = ctxt->myDoc;