summaryrefslogtreecommitdiff
path: root/ext/bcmath/libbcmath/src/init.c
diff options
context:
space:
mode:
authorGeorge Peter Banyard <girgias@php.net>2020-09-11 17:40:06 +0200
committerGeorge Peter Banyard <girgias@php.net>2020-09-11 17:40:06 +0200
commitcd05b56a6f7d4f03a80f86c15248eda995b1762e (patch)
treebe55bb068dc85f3d9c4853b22924356aa5a081a5 /ext/bcmath/libbcmath/src/init.c
parentf29bfc0bd8c0dc152e6115ec260957e1617d08dc (diff)
downloadphp-git-cd05b56a6f7d4f03a80f86c15248eda995b1762e.tar.gz
Promote some warnings in BCMath to Errors
Also do a bit of refactoring at the same time. Closes GH-6105
Diffstat (limited to 'ext/bcmath/libbcmath/src/init.c')
-rw-r--r--ext/bcmath/libbcmath/src/init.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/ext/bcmath/libbcmath/src/init.c b/ext/bcmath/libbcmath/src/init.c
index 676076f89d..96e934b34d 100644
--- a/ext/bcmath/libbcmath/src/init.c
+++ b/ext/bcmath/libbcmath/src/init.c
@@ -44,10 +44,6 @@ _bc_new_num_ex (length, scale, persistent)
int length, scale, persistent;
{
bc_num temp;
- /* PHP Change: add length check */
- if ((size_t)length+(size_t)scale > INT_MAX) {
- zend_error(E_ERROR, "Result too long, max is %d", INT_MAX);
- }
/* PHP Change: malloc() -> pemalloc(), removed free_list code */
temp = (bc_num) safe_pemalloc (1, sizeof(bc_struct)+length, scale, persistent);
temp->n_sign = PLUS;