diff libtommath/bn_mp_mod.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_mod.c	Wed Mar 02 13:23:27 2011 +0000
+++ b/libtommath/bn_mp_mod.c	Fri Mar 18 14:31:07 2011 +0000
@@ -22,7 +22,7 @@
   mp_int  t;
   int     res;
 
-  if ((res = mp_init (&t)) != MP_OKAY) {
+  if ((res = mp_init_size (&t, b->used)) != MP_OKAY) {
     return res;
   }