Skip to content

Commit 9b8f252

Browse files
committed
- 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]
1 parent af3adf8 commit 9b8f252

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? 20??, PHP 5.3.2
4+
- Added LIBXML_PARSEHUGE constant to overrides the maximum text size of a
5+
single text node when using libxml2.7.3+. (Kalle)
6+
47
- Upgraded bundled sqlite to version 3.6.20. (Ilia)
58
- Upgraded bundled PCRE to version 8.00. (Scott)
69

@@ -81,6 +84,7 @@ PHP NEWS
8184
property in base class). (Felipe)
8285
- Fixed bug #49677 (ini parser crashes with apache2 and using ${something}
8386
ini variables). (Jani)
87+
- Fixed bug #49660 (libxml 2.7.3+ limits text nodes to 10MB). (Felipe)
8488
- Fixed bug #49647 (DOMUserData does not exist). (Rob)
8589
- Fixed bug #49521 (PDO fetchObject sets values before calling constructor).
8690
(Pierrick)

ext/libxml/libxml.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,9 @@ static PHP_MINIT_FUNCTION(libxml)
621621
#if LIBXML_VERSION >= 20621
622622
REGISTER_LONG_CONSTANT("LIBXML_COMPACT", XML_PARSE_COMPACT, CONST_CS | CONST_PERSISTENT);
623623
REGISTER_LONG_CONSTANT("LIBXML_NOXMLDECL", XML_SAVE_NO_DECL, CONST_CS | CONST_PERSISTENT);
624+
#endif
625+
#if LIBXML_VERSION >= 20703
626+
REGISTER_LONG_CONSTANT("LIBXML_PARSEHUGE", XML_PARSE_HUGE, CONST_CS | CONST_PERSISTENT);
624627
#endif
625628
REGISTER_LONG_CONSTANT("LIBXML_NOEMPTYTAG", LIBXML_SAVE_NOEMPTYTAG, CONST_CS | CONST_PERSISTENT);
626629

ext/soap/php_xml.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ xmlDocPtr soap_xmlParseMemory(const void *buf, size_t buf_size)
138138
ctxt->sax->warning = NULL;
139139
ctxt->sax->error = NULL;
140140
/*ctxt->sax->fatalError = NULL;*/
141+
#if LIBXML_VERSION >= 20703
142+
ctxt->options |= XML_PARSE_HUGE;
143+
#endif
141144
xmlParseDocument(ctxt);
142145
if (ctxt->wellFormed) {
143146
ret = ctxt->myDoc;

0 commit comments

Comments
 (0)