]> 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]

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

index 534138d679edf9bb8a46f7765c4a3b358852b70d..86819c6e7727fd141c9f0ed1a4fc22449def6bdb 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 401f37e3fa26c3b2e6b22b60c1a8c81dcaaf4ebf..1432742dc9f44678f6b8299042389dbb3c688fc2 100644 (file)
@@ -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;