bug67247.phpt 353 B

12345678910111213
  1. --TEST--
  2. Bug #67247 (spl_fixedarray_resize integer overflow)
  3. --FILE--
  4. <?php
  5. $ar = new SplFixedArray(1);
  6. echo "size: ".$ar->getSize()."\n";
  7. $ar->setSize((PHP_INT_SIZE==8)?0x2000000000000001:0x40000001);
  8. echo "size: ".$ar->getSize()."\n";
  9. ?>
  10. --EXPECTF--
  11. size: 1
  12. Fatal error: Possible integer overflow in memory allocation (%d * %d + 0) in %s on line %d