Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
--TEST-- Bug #76874: xml_parser_free() should never leak memory --EXTENSIONS-- xml --FILE-..
Decoded Output download
--TEST--
Bug #76874: xml_parser_free() should never leak memory
--EXTENSIONS--
xml
--FILE--
<?php
class c
{
private $xml;
private $test;
public function test()
{
$this->xml = xml_parser_create();
xml_set_character_data_handler($this->xml, array(&$this, 'handle_cdata'));
xml_parser_free($this->xml);
}
public function handle_cdata(&$parser, $data)
{
}
}
$object = new c();
$object->test();
?>
===DONE===
--EXPECT--
===DONE===
Did this file decode correctly?
Original Code
--TEST--
Bug #76874: xml_parser_free() should never leak memory
--EXTENSIONS--
xml
--FILE--
<?php
class c
{
private $xml;
private $test;
public function test()
{
$this->xml = xml_parser_create();
xml_set_character_data_handler($this->xml, array(&$this, 'handle_cdata'));
xml_parser_free($this->xml);
}
public function handle_cdata(&$parser, $data)
{
}
}
$object = new c();
$object->test();
?>
===DONE===
--EXPECT--
===DONE===
Function Calls
None |
Stats
MD5 | 455db84533724ebbcd1e50c830b3649f |
Eval Count | 0 |
Decode Time | 116 ms |