mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Ensure bcmath scale is between 0 and INT_MAX
Make sure bcmatch scale is between 0 and INT_MAX, both for the ini setting, and all the functions accepting a scale argument. A ValueError is thrown if a function argument is out of range. Closes GH-5455.
This commit is contained in:
parent
48a34bc120
commit
b64aee9706
6 changed files with 177 additions and 36 deletions
|
@ -33,7 +33,7 @@ ZEND_BEGIN_MODULE_GLOBALS(bcmath)
|
|||
bc_num _zero_;
|
||||
bc_num _one_;
|
||||
bc_num _two_;
|
||||
zend_long bc_precision;
|
||||
int bc_precision;
|
||||
ZEND_END_MODULE_GLOBALS(bcmath)
|
||||
|
||||
#if defined(ZTS) && defined(COMPILE_DL_BCMATH)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue