Skip to content

Commit dbd41db

Browse files
Merge #759: Fix uninitialized variables in ecmult_multi test
2e7fc5b Fix uninitialized variables in ecmult_multi test (Jonas Nick) Pull request description: Fixes #756 ACKs for top commit: real-or-random: ACK 2e7fc5b I inspected the diff. I did not test it and I did not check whether if makes the warning go away elichai: tACK 2e7fc5b Tree-SHA512: 674400134f5487236f5b6e8b3020b346d43662511628cdf6dd1bd7ba1de985bf93f5be11f5650f250ff37b5f87eb4b01d90ed53d41193c05a420d3f5a2d63470
2 parents 2ed54da + 2e7fc5b commit dbd41db

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)