diff options
author | Matt Johnston <matt@ucc.asn.au> | 2011-03-18 14:31:07 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2011-03-18 14:31:07 +0000 |
commit | 9a007c30d47dad0eb052cd83c45c84b7b2320dce (patch) | |
tree | a3c71d34db4d2b66c293014685709ba03635be15 /libtommath/bn_mp_mulmod.c | |
parent | 8a545a0d0467ce01d974ec7da0a7bd4ca316fab8 (diff) |
Use mp_init_size() to avoid some mp_grow()s
--HG--
extra : convert_revision : 94b7dd79a8e970e9641d4e655b3db48190ac2531
Diffstat (limited to 'libtommath/bn_mp_mulmod.c')
-rw-r--r-- | libtommath/bn_mp_mulmod.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libtommath/bn_mp_mulmod.c b/libtommath/bn_mp_mulmod.c index 46818b6..24c9749 100644 --- a/libtommath/bn_mp_mulmod.c +++ b/libtommath/bn_mp_mulmod.c @@ -21,7 +21,7 @@ int mp_mulmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d) int res; mp_int t; - if ((res = mp_init (&t)) != MP_OKAY) { + if ((res = mp_init_size (&t, c->used)) != MP_OKAY) { return res; } |