diff libtommath/bn_mp_mulmod.c @ 608:4fbf9a7556ed

Use mp_init_size() to avoid some mp_grow()s
author Matt Johnston <matt@ucc.asn.au>
date Fri, 18 Mar 2011 14:31:07 +0000
parents 5ff8218bcee9
children 60fc6476e044
line wrap: on
line diff
--- a/libtommath/bn_mp_mulmod.c	Wed Mar 02 13:23:27 2011 +0000
+++ b/libtommath/bn_mp_mulmod.c	Fri Mar 18 14:31:07 2011 +0000
@@ -21,7 +21,7 @@
   int     res;
   mp_int  t;
 
-  if ((res = mp_init (&t)) != MP_OKAY) {
+  if ((res = mp_init_size (&t, c->used)) != MP_OKAY) {
     return res;
   }