mirror of
https://github.com/php/php-src.git
synced 2026-03-31 20:53:00 +02:00
It fixes several bugs: - Fixed bug #45554 (Inconsistent behavior of the u format char). - Fixed bug #48225 (DateTime parser doesn't set microseconds for "now"). - Fixed bug #52514 (microseconds are missing in DateTime class). - Fixed bug #52519 (microseconds in DateInterval are missing). - Fixed bug #68506 (General DateTime improvments needed for microseconds to become useful). - Fixed bug #73109 (timelib_meridian doesn't parse dots correctly). - Fixed bug #73247 (DateTime constructor does not initialise microseconds property). It also updates timelib to 2016.04, and updates a data mapping file, which causes changes to the volatile abbreviations tests.
53 lines
940 B
PHP
53 lines
940 B
PHP
--TEST--
|
|
SPL: Bug #70155 Use After Free Vulnerability in unserialize() with SPLArrayObject
|
|
--FILE--
|
|
<?php
|
|
$inner = 'x:i:0;O:12:"DateInterval":1:{s:1:"y";i:3;};m:a:1:{i:0;R:2;}';
|
|
$exploit = 'C:11:"ArrayObject":'.strlen($inner).':{'.$inner.'}';
|
|
$data = unserialize($exploit);
|
|
|
|
var_dump($data);
|
|
?>
|
|
===DONE===
|
|
--EXPECTF--
|
|
object(ArrayObject)#1 (2) {
|
|
[0]=>
|
|
int(0)
|
|
["storage":"ArrayObject":private]=>
|
|
object(DateInterval)#2 (16) {
|
|
["y"]=>
|
|
int(3)
|
|
["m"]=>
|
|
int(-1)
|
|
["d"]=>
|
|
int(-1)
|
|
["h"]=>
|
|
int(-1)
|
|
["i"]=>
|
|
int(-1)
|
|
["s"]=>
|
|
int(-1)
|
|
["f"]=>
|
|
float(-1)
|
|
["weekday"]=>
|
|
int(-1)
|
|
["weekday_behavior"]=>
|
|
int(-1)
|
|
["first_last_day_of"]=>
|
|
int(-1)
|
|
["invert"]=>
|
|
int(0)
|
|
["days"]=>
|
|
int(-1)
|
|
["special_type"]=>
|
|
int(0)
|
|
["special_amount"]=>
|
|
int(-1)
|
|
["have_weekday_relative"]=>
|
|
int(0)
|
|
["have_special_relative"]=>
|
|
int(0)
|
|
}
|
|
}
|
|
===DONE===
|