mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
Fixed an issue where leading zeros were padded beyond the allocated memory. fixes #16978 closes #16988
13 lines
321 B
PHP
13 lines
321 B
PHP
--TEST--
|
|
GH-16978 Stack buffer overflow ext/bcmath/libbcmath/src/div.c:464:12 in bc_divide
|
|
--EXTENSIONS--
|
|
bcmath
|
|
--FILE--
|
|
<?php
|
|
echo bcpow('10', '-112', 10) . "\n";
|
|
echo bcdiv('1', '10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 1);
|
|
?>
|
|
--EXPECT--
|
|
0.0000000000
|
|
0.0
|