Annotation of embedaddon/php/ext/standard/tests/serialize/bug25378.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #25378 (unserialize() crashes with invalid data)
! 3: --FILE--
! 4: <?php
! 5: var_dump(unserialize("s:-1:\"\";"));
! 6: var_dump(unserialize("i:823"));
! 7: var_dump(unserialize("O:8:\"stdClass :0:{}"));
! 8: var_dump(unserialize("O:8:\"stdClass\"+0:{}"));
! 9: var_dump(unserialize("O:1000:\"stdClass\":0:{}"));
! 10: var_dump(unserialize("a:2:{i:0;s:2:\"12\":"));
! 11: var_dump(unserialize("a:2:{i:0;s:2:\"12\";i:1;s:3000:\"123"));
! 12: var_dump(unserialize("a:2:{i:0;s:2:\"12\"+i:1;s:3:\"123\";}"));
! 13: var_dump(unserialize("a:2:{i:0;s:2:\"12\";i:1;s:3:\"123\";"));
! 14: var_dump(unserialize("s:3000:\"123\";"));
! 15: var_dump(unserialize("s:3000:\"123"));
! 16: var_dump(unserialize("s:3:\"123;"));
! 17: var_dump(unserialize("s:0:\"123\";"));
! 18: ?>
! 19: ===DONE===
! 20: --EXPECTF--
! 21: Notice: unserialize(): Error at offset 0 of 8 bytes in %sbug25378.php on line %d
! 22: bool(false)
! 23:
! 24: Notice: unserialize(): Error at offset 0 of 5 bytes in %sbug25378.php on line %d
! 25: bool(false)
! 26:
! 27: Notice: unserialize(): Error at offset 13 of 19 bytes in %sbug25378.php on line %d
! 28: bool(false)
! 29:
! 30: Notice: unserialize(): Error at offset 14 of 19 bytes in %sbug25378.php on line %d
! 31: bool(false)
! 32:
! 33: Notice: unserialize(): Error at offset 2 of 22 bytes in %sbug25378.php on line %d
! 34: bool(false)
! 35:
! 36: Notice: unserialize(): Error at offset 17 of 18 bytes in %sbug25378.php on line %d
! 37: bool(false)
! 38:
! 39: Notice: unserialize(): Error at offset 24 of 33 bytes in %sbug25378.php on line %d
! 40: bool(false)
! 41:
! 42: Notice: unserialize(): Error at offset 17 of 33 bytes in %sbug25378.php on line %d
! 43: bool(false)
! 44:
! 45: Notice: unserialize(): Error at offset 33 of 32 bytes in %sbug25378.php on line %d
! 46: bool(false)
! 47:
! 48: Notice: unserialize(): Error at offset 2 of 13 bytes in %sbug25378.php on line %d
! 49: bool(false)
! 50:
! 51: Notice: unserialize(): Error at offset 2 of 11 bytes in %sbug25378.php on line %d
! 52: bool(false)
! 53:
! 54: Notice: unserialize(): Error at offset 8 of 9 bytes in %sbug25378.php on line %d
! 55: bool(false)
! 56:
! 57: Notice: unserialize(): Error at offset 5 of 10 bytes in %sbug25378.php on line %d
! 58: bool(false)
! 59: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>