diff options
author | Torbjorn Granlund <tege@gmplib.org> | 2014-01-19 13:10:19 +0100 |
---|---|---|
committer | Torbjorn Granlund <tege@gmplib.org> | 2014-01-19 13:10:19 +0100 |
commit | f6696ef00801604812cddeacfcc71c5cbe6706dc (patch) | |
tree | 47d61819dae9278546c41dec4271662ca55e96be /mpf/init.c | |
parent | 548dda66b59dfd7f131c3801100b3af008323ef0 (diff) | |
download | gmp-f6696ef00801604812cddeacfcc71c5cbe6706dc.tar.gz |
Avoid overflow in allocation computation.
Diffstat (limited to 'mpf/init.c')
-rw-r--r-- | mpf/init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mpf/init.c b/mpf/init.c index b68dfc1dc..01a41a2b7 100644 --- a/mpf/init.c +++ b/mpf/init.c @@ -27,5 +27,5 @@ mpf_init (mpf_ptr r) r->_mp_size = 0; r->_mp_exp = 0; r->_mp_prec = prec; - r->_mp_d = (mp_ptr) (*__gmp_allocate_func) ((prec + 1) * BYTES_PER_MP_LIMB); + r->_mp_d = (mp_ptr) (*__gmp_allocate_func) ((size_t) (prec + 1) * BYTES_PER_MP_LIMB); } |