1--TEST--
2Bug #73144 (Use-afte-free in ArrayObject Deserialization)
3--FILE--
4<?php
5try {
6$token = 'a:2:{i:0;O:1:"0":2:0s:1:"0";i:0;s:1:"0";a:1:{i:0;C:11:"ArrayObject":7:{x:i:0;r}';
7$obj = unserialize($token);
8} catch(Exception $e) {
9	echo $e->getMessage()."\n";
10}
11
12try {
13$inner = 'x:i:1;O:8:"stdClass":1:{};m:a:0:{}';
14$exploit = 'C:11:"ArrayObject":'.strlen($inner).':{'.$inner.'}';
15unserialize($exploit);
16} catch(Exception $e) {
17	echo $e->getMessage()."\n";
18}
19?>
20--EXPECTF--
21Error at offset 6 of 7 bytes
22
23Notice: ArrayObject::unserialize(): Unexpected end of serialized data in %sbug73341.php on line %d
24Error at offset 24 of 34 bytes
25