File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / spl / tests / bug67247.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Sun Jun 15 20:03:55 2014 UTC (10 years, 1 month ago) by misho
Branches: php, MAIN
CVS tags: v5_4_29, HEAD
php 5.4.29

--TEST--
Bug #67247 (spl_fixedarray_resize integer overflow)
--FILE--
<?php
$ar = new SplFixedArray(1);
echo "size: ".$ar->getSize()."\n";
$ar->setSize((PHP_INT_SIZE==8)?0x2000000000000001:0x40000001);
echo "size: ".$ar->getSize()."\n";
?>
--EXPECTF--
size: 1

Fatal error: Possible integer overflow in memory allocation (%d * %d + 0) in %s on line %d 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>