diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2014-01-16 12:10:56 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2014-01-16 12:10:56 +0000 |
commit | d4a6d4fce6d302077c028f13b70572fc541b3972 (patch) | |
tree | 424a133c6ccd20d6136e15a7df845b54ce42d712 /src | |
parent | 24a0167bdd2e10bfa36461f4fedabe7f14781f4f (diff) | |
download | mpfr-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.c | 2 |
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)) |