Skip to content

Commit

Permalink
Merge bitcoin#759: Fix uninitialized variables in ecmult_multi test
Browse files Browse the repository at this point in the history
2e7fc5b Fix uninitialized variables in ecmult_multi test (Jonas Nick)

Pull request description:

  Fixes bitcoin#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
  • Loading branch information
real-or-random committed Jun 15, 2020
2 parents 2ed54da + 2e7fc5b commit dbd41db
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.*/
Expand Down

0 comments on commit dbd41db

Please sign in to comment.