This commit is contained in:
Joe Watkins 2016-11-12 17:46:40 +00:00
commit 147f1f2e3b
3 changed files with 35 additions and 6 deletions

9
NEWS
View File

@ -2,12 +2,14 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 7.1
10 Nov 2016, PHP 7.1.0RC6
- Calendar:
. Fix integer overflows (Joshua Rogers)
- XML:
. Fixed bug #72135 (malformed XML causes fault) (edgarsandi)
10 Nov 2016, PHP 7.1.0RC6
- Core:
. Fixded bug #72736 (Slow performance when fetching large dataset with mysqli
/ PDO). (Dmitry)
@ -48,6 +50,7 @@ PHP NEWS
with PDORow). (Stas)
27 Oct 2016, PHP 7.1.0RC5
=======
- Core:
. Fixed bug #73350 (Exception::__toString() cause circular references).

View File

@ -593,10 +593,12 @@ has been defined and none can be detected */
}
#endif
if (parser->parser->lastError.level >= XML_ERR_WARNING) {
return 0;
}
error = xmlParseChunk(parser->parser, (char *) data, data_len, is_final);
if (!error) {
return 1;
} else if (parser->parser->lastError.level > XML_ERR_WARNING ){
if (error) {
return 0;
} else {
return 1;

View File

@ -0,0 +1,24 @@
--TEST--
Bug #73135 (xml_parse() segmentation fault)
--CREDITS--
edgarsandi - <edgar.r.sandi@gmail.com>
--FILE--
<?php
function start_elem($parser, $xml) {
xml_parse($parser, $xml);
}
$xml = <<<HERE
<a xmlns="ahihi">
<bar foo="ahihi"/>
</a>
HERE;
$parser = xml_parser_create_ns();
xml_set_element_handler($parser, 'start_elem', 'ahihi');
xml_parse($parser, $xml);
?>
--EXPECTF--
Warning: xml_parse(): Unable to call handler ahihi() in %s%ebug73135.php on line %d
Warning: xml_parse(): Unable to call handler ahihi() in %s%ebug73135.php on line %d