php-src/Zend/tests/gh15712.phpt
David Carlier 503d9145e0
Fix GH-15712: overflow on float print with precision ini large value.
When allocating enough room for floats, the allocator used overflows with
large ndigits/EG(precision) value which used an signed integer to
increase the size of thebuffer.
Testing with the zend operator directly is enough to trigger
the issue rather than higher level math interface.

close GH-15715
2024-09-11 21:19:07 +01:00

10 lines
142 B
PHP

--TEST--
GH-15712: overflow on real number printing
--FILE--
<?php
ini_set('precision', 1100000000);
echo -1 * (2 ** -10);
?>
--EXPECTF--
%s