aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/math/mp/mp_karat.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-03-14 06:43:49 -0400
committerJack Lloyd <[email protected]>2018-03-14 06:43:49 -0400
commite3c05e70379f2ba593724a072aa3d6404eebbe81 (patch)
tree9f5ff539d9844fb679481ca424ca5a4462191efa /src/lib/math/mp/mp_karat.cpp
parentdeb54a47d76a2de8bb9d1faae8f13a31429ba489 (diff)
Improve memory handling for PointGFp
Diffstat (limited to 'src/lib/math/mp/mp_karat.cpp')
-rw-r--r--src/lib/math/mp/mp_karat.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/math/mp/mp_karat.cpp b/src/lib/math/mp/mp_karat.cpp
index 6fb217668..e460aaac9 100644
--- a/src/lib/math/mp/mp_karat.cpp
+++ b/src/lib/math/mp/mp_karat.cpp
@@ -326,6 +326,8 @@ void bigint_sqr(word z[], size_t z_size,
const word x[], size_t x_size, size_t x_sw,
word workspace[], size_t ws_size)
{
+ clear_mem(z, z_size);
+
BOTAN_ASSERT(z_size/2 >= x_sw, "Output size is sufficient");
if(x_sw == 1)