mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
- Fixed bug #60337 bcscale related crashed on 64bits platforms
This commit is contained in:
parent
7439154ece
commit
b141fb1afb
3 changed files with 16 additions and 1 deletions
2
NEWS
2
NEWS
|
@ -52,6 +52,8 @@ PHP NEWS
|
|||
. Remove EXPERIMENTAL flag. (fat)
|
||||
. Added .phar to default authorized extensions. (fat)
|
||||
|
||||
- BCmath:
|
||||
. Fixed bug #60377 (bcscale related crashes on 64bits platforms) (shm)
|
||||
|
||||
11 Nov 2011, PHP 5.4.0 RC1
|
||||
- General improvements:
|
||||
|
|
|
@ -560,7 +560,7 @@ PHP_FUNCTION(bcscale)
|
|||
return;
|
||||
}
|
||||
|
||||
BCG(bc_precision) = (new_scale < 0) ? 0 : new_scale;
|
||||
BCG(bc_precision) = ((int)new_scale < 0) ? 0 : new_scale;
|
||||
|
||||
RETURN_TRUE;
|
||||
}
|
||||
|
|
13
ext/bcmath/tests/bug60377.phpt
Normal file
13
ext/bcmath/tests/bug60377.phpt
Normal file
|
@ -0,0 +1,13 @@
|
|||
--TEST--
|
||||
bcscale related problem on 64bits platforms
|
||||
--SKIPIF--
|
||||
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$var48 = bcscale(634314234334311);
|
||||
$var67 = bcsqrt(false);
|
||||
$var414 = bcadd(false,null,10);
|
||||
die('ALIVE');
|
||||
?>
|
||||
--EXPECTF--
|
||||
ALIVE
|
Loading…
Add table
Add a link
Reference in a new issue