Skip to content

Commit 2e7fc5b

Browse files
committed
Fix uninitialized variables in ecmult_multi test
1 parent 2ed54da commit 2e7fc5b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/tests.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2967,14 +2967,16 @@ void test_ecmult_multi(secp256k1_scratch *scratch, secp256k1_ecmult_multi_func e
29672967

29682968
void test_ecmult_multi_batch_single(secp256k1_ecmult_multi_func ecmult_multi) {
29692969
secp256k1_scalar szero;
2970-
secp256k1_scalar sc[32];
2971-
secp256k1_ge pt[32];
2970+
secp256k1_scalar sc;
2971+
secp256k1_ge pt;
29722972
secp256k1_gej r;
29732973
ecmult_multi_data data;
29742974
secp256k1_scratch *scratch_empty;
29752975

2976-
data.sc = sc;
2977-
data.pt = pt;
2976+
random_group_element_test(&pt);
2977+
random_scalar_order(&sc);
2978+
data.sc = ≻
2979+
data.pt = &pt;
29782980
secp256k1_scalar_set_int(&szero, 0);
29792981

29802982
/* Try to multiply 1 point, but scratch space is empty.*/

0 commit comments

Comments
 (0)