summaryrefslogtreecommitdiff
path: root/ext/bcmath/libbcmath/src
diff options
context:
space:
mode:
authorVladyslav Startsev <17382248+vladyslavstartsev@users.noreply.github.com>2020-06-20 18:26:51 +0300
committerMáté Kocsis <kocsismate@woohoolabs.com>2020-06-22 09:31:55 +0200
commit2c97b401c61ad09ea0bb0045314b410a97e1d4ac (patch)
tree3cba1bfd15128c6d0c5692f51b2fa03082394885 /ext/bcmath/libbcmath/src
parentec80b781dbd1978653b2e20d6b99ed61e65e646f (diff)
downloadphp-git-2c97b401c61ad09ea0bb0045314b410a97e1d4ac.tar.gz
make bcpowmod stricter by not returning false, instead throw exception
Closes GH-5747
Diffstat (limited to 'ext/bcmath/libbcmath/src')
-rw-r--r--ext/bcmath/libbcmath/src/raisemod.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/bcmath/libbcmath/src/raisemod.c b/ext/bcmath/libbcmath/src/raisemod.c
index 2865903940..46dfd7a8a8 100644
--- a/ext/bcmath/libbcmath/src/raisemod.c
+++ b/ext/bcmath/libbcmath/src/raisemod.c
@@ -67,7 +67,7 @@ bc_raisemod (bc_num base, bc_num expo, bc_num mod, bc_num *result, int scale)
/* Check for correct numbers. */
if (bc_is_zero(mod)) return -1;
- if (bc_is_neg(expo)) return -1;
+ if (bc_is_neg(expo)) return -2;
/* Set initial values. */
power = bc_copy_num (base);