unserialize_leak.phpt 463 B

12345678910111213141516
  1. --TEST--
  2. Unserialize leak in SplObjectStorage
  3. --FILE--
  4. <?php
  5. $payload = 'C:16:"SplObjectStorage":113:{x:i:2;O:8:"stdClass":1:{},a:2:{s:4:"prev";i:2;s:4:"next";O:8:"stdClass":0:{}};r:7;,R:2;s:4:"next";;r:3;};m:a:0:{}}';
  6. try {
  7. var_dump(unserialize($payload));
  8. } catch (Exception $e) {
  9. echo $e->getMessage(), "\n";
  10. }
  11. ?>
  12. --EXPECTF--
  13. Notice: SplObjectStorage::unserialize(): Unexpected end of serialized data in %s on line %d
  14. Error at offset 24 of 113 bytes