From b64aee97069fc77c141c787e5408d9e12f5971b4 Mon Sep 17 00:00:00 2001 From: Vladyslav Startsev <17382248+vladyslavstartsev@users.noreply.github.com> Date: Sat, 25 Apr 2020 02:18:09 +0300 Subject: 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. --- ext/bcmath/php_bcmath.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/bcmath/php_bcmath.h') diff --git a/ext/bcmath/php_bcmath.h b/ext/bcmath/php_bcmath.h index bafaf29e7a..c7a8a85d73 100644 --- a/ext/bcmath/php_bcmath.h +++ b/ext/bcmath/php_bcmath.h @@ -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) -- cgit v1.2.1