From 2e7fc5b5372067ecd33b2304e8c88ed6de98ff13 Mon Sep 17 00:00:00 2001 From: Jonas Nick Date: Mon, 15 Jun 2020 09:02:14 +0000 Subject: [PATCH] Fix uninitialized variables in ecmult_multi test --- src/tests.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/tests.c b/src/tests.c index 374ed7dc12732..b07a8e6dd03ea 100644 --- a/src/tests.c +++ b/src/tests.c @@ -2967,14 +2967,16 @@ void test_ecmult_multi(secp256k1_scratch *scratch, secp256k1_ecmult_multi_func e void test_ecmult_multi_batch_single(secp256k1_ecmult_multi_func ecmult_multi) { secp256k1_scalar szero; - secp256k1_scalar sc[32]; - secp256k1_ge pt[32]; + secp256k1_scalar sc; + secp256k1_ge pt; secp256k1_gej r; ecmult_multi_data data; secp256k1_scratch *scratch_empty; - data.sc = sc; - data.pt = pt; + random_group_element_test(&pt); + random_scalar_order(&sc); + data.sc = ≻ + data.pt = &pt; secp256k1_scalar_set_int(&szero, 0); /* Try to multiply 1 point, but scratch space is empty.*/