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.3.2RC1~132 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9b8f2525aa8cce41185af9e1c45b0ea1ca498c92;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/NEWS b/NEWS index 9c2af91088..f509855111 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 20??, PHP 5.3.2 +- Added LIBXML_PARSEHUGE constant to overrides the maximum text size of a + single text node when using libxml2.7.3+. (Kalle) + - Upgraded bundled sqlite to version 3.6.20. (Ilia) - Upgraded bundled PCRE to version 8.00. (Scott) @@ -81,6 +84,7 @@ PHP NEWS property in base class). (Felipe) - Fixed bug #49677 (ini parser crashes with apache2 and using ${something} ini variables). (Jani) +- Fixed bug #49660 (libxml 2.7.3+ limits text nodes to 10MB). (Felipe) - Fixed bug #49647 (DOMUserData does not exist). (Rob) - Fixed bug #49521 (PDO fetchObject sets values before calling constructor). (Pierrick) diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index 40f425760f..2ea3000072 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 4bc14a46d3..30d34535e6 100644 --- a/ext/soap/php_xml.c +++ b/ext/soap/php_xml.c @@ -138,6 +138,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;