summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2014-01-16 12:10:56 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2014-01-16 12:10:56 +0000
commitd4a6d4fce6d302077c028f13b70572fc541b3972 (patch)
tree424a133c6ccd20d6136e15a7df845b54ce42d712 /src
parent24a0167bdd2e10bfa36461f4fedabe7f14781f4f (diff)
downloadmpfr-d4a6d4fce6d302077c028f13b70572fc541b3972.tar.gz
[src/get_z_exp.c] Avoid a potential overflow.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8751 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src')
-rw-r--r--src/get_z_exp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/get_z_exp.c b/src/get_z_exp.c
index f42f17c12..7c87be356 100644
--- a/src/get_z_exp.c
+++ b/src/get_z_exp.c
@@ -56,7 +56,7 @@ mpfr_get_z_2exp (mpz_ptr z, mpfr_srcptr f)
fn = MPFR_LIMB_SIZE(f);
/* check whether allocated space for z is enough */
- mpz_realloc2 (z, fn * GMP_NUMB_BITS);
+ mpz_realloc2 (z, (mp_bitcnt_t) fn * GMP_NUMB_BITS);
MPFR_UNSIGNED_MINUS_MODULO (sh, MPFR_PREC (f));
if (MPFR_LIKELY (sh))