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 #79151: heap use after free caused by spl_dllist_it_helper_move_forward --FIL..

Decoded Output download

--TEST--
Bug #79151: heap use after free caused by spl_dllist_it_helper_move_forward
--FILE--
<?php

$a = new SplDoublyLinkedList();
$a->setIteratorMode(SplDoublyLinkedList::IT_MODE_LIFO | SplDoublyLinkedList::IT_MODE_DELETE);
$a->push(1);
$a->rewind();
$a->unshift(2);
var_dump($a->pop());
var_dump($a->next());

$a = new SplDoublyLinkedList();
$a->setIteratorMode(SplDoublyLinkedList::IT_MODE_FIFO | SplDoublyLinkedList::IT_MODE_DELETE);
$a->unshift(1);
$a->rewind();
$a->push(2);
var_dump($a->shift());
var_dump($a->next());

?>
--EXPECT--
int(1)
NULL
int(1)
NULL

Did this file decode correctly?

Original Code

--TEST--
Bug #79151: heap use after free caused by spl_dllist_it_helper_move_forward
--FILE--
<?php

$a = new SplDoublyLinkedList();
$a->setIteratorMode(SplDoublyLinkedList::IT_MODE_LIFO | SplDoublyLinkedList::IT_MODE_DELETE);
$a->push(1);
$a->rewind();
$a->unshift(2);
var_dump($a->pop());
var_dump($a->next());

$a = new SplDoublyLinkedList();
$a->setIteratorMode(SplDoublyLinkedList::IT_MODE_FIFO | SplDoublyLinkedList::IT_MODE_DELETE);
$a->unshift(1);
$a->rewind();
$a->push(2);
var_dump($a->shift());
var_dump($a->next());

?>
--EXPECT--
int(1)
NULL
int(1)
NULL

Function Calls

None

Variables

None

Stats

MD5 5ac271f52f8b84f6cae2100b550d7e09
Eval Count 0
Decode Time 118 ms