]> granicus.if.org Git - php/commitdiff
- Fixed bug #49660 (libxml 2.7.3+ limits text nodes to 10MB). (Felipe)
authorFelipe Pena <felipe@php.net>
Tue, 1 Dec 2009 02:05:28 +0000 (02:05 +0000)
committerFelipe Pena <felipe@php.net>
Tue, 1 Dec 2009 02:05:28 +0000 (02:05 +0000)
- Added LIBXML_PARSEHUGE constant to overrides the maximum text size of a
  single text node when using libxml2.7.3+. (Kalle)
[DOC]

NEWS
ext/libxml/libxml.c
ext/soap/php_xml.c

diff --git a/NEWS b/NEWS
index 638376882b93f0c2f054799aae43e3f1e4d30d33..8b1806e268858e777bac0145dcde64eebb8e5e96 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,11 +1,15 @@
 PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? Dec 2009, PHP 5.2.12RC4
+- Added LIBXML_PARSEHUGE constant to overrides the maximum text size of a
+  single text node when using libxml2.7.3+. (Kalle)
+
 - Improved fix for bug #50006 (Segfault caused by uksort()). (Stas)
 
 - Fixed bug #50266 (conflicting types for llabs). (Jani)
 - Fixed bug #50168 (FastCGI fails with wrong error on HEAD request to
   non-existant file). (Dmitry)
+- Fixed bug #49660 (libxml 2.7.3+ limits text nodes to 10MB). (Felipe)
 
 27 Nov 2009, PHP 5.2.12RC3
 - Fixed break in the build chain introduced in 5.2.12RC2 (Jani)
index 930cf4930784bfdf9fcc250e22cfd6a64dd8e846..bc4203b919972182f7ba2f418acaa183c579b729 100644 (file)
@@ -626,6 +626,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);
 
index 4bc14a46d330ac737af075f96e16a3037911941a..30d34535e6a3d959e3860ac92ec4c765a3f348ea 100644 (file)
@@ -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;