xref: /PHP-7.0/ext/date/tests/bug68942.phpt (revision 5d2294e8)
1--TEST--
2Bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone).
3--FILE--
4<?php
5$data = unserialize('a:2:{i:0;O:12:"DateTimeZone":2:{s:13:"timezone_type";a:2:{i:0;i:1;i:1;i:2;}s:8:"timezone";s:1:"A";}i:1;R:4;}');
6var_dump($data);
7?>
8--EXPECTF--
9Fatal error: DateTimeZone::__wakeup(): Timezone initialization failed in %s%ebug68942.php on line %d
10