aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/math/numbertheory/mod_inv.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/math/numbertheory/mod_inv.cpp b/src/lib/math/numbertheory/mod_inv.cpp
index ce8afb893..013b5bdc5 100644
--- a/src/lib/math/numbertheory/mod_inv.cpp
+++ b/src/lib/math/numbertheory/mod_inv.cpp
@@ -221,6 +221,7 @@ BigInt inverse_mod_pow2(const BigInt& a1, size_t k)
const size_t a_words = a.sig_words();
+ X.grow_to(round_up(k, BOTAN_MP_WORD_BITS) / BOTAN_MP_WORD_BITS);
b.grow_to(a_words);
/*