]> 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 9c2af910887de8780c7a3382fad964422ca1adda..f5098551110e7ba7c66431db85beb5522c2119c5 100644 (file)
--- 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)
index 40f425760f8b0d567c26b5baa584ae5deecaf0dd..2ea3000072ce68b0f93a504217981b2da416b5fd 100644 (file)
@@ -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);
 
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;