Merge #889: fix uninitialized read in tests
99a1cfec17print warnings for conditional-uninitialized (PiRK)3d2cf6c5bdinitialize variable in tests (PiRK) Pull request description: ACKs for top commit: real-or-random: ACK99a1cfec17code inspection jonasnick: ACK99a1cfec17Tree-SHA512: 72f92f51c44210ab54f166920f540525db0e3d1f19a2fa56e4a6d157a38a582f9dc649d919cf3278482c9fd723021b07759284a8fccbc574b62a22aac0facf51
This commit is contained in:
@@ -4526,8 +4526,10 @@ void test_ecdsa_sign_verify(void) {
|
||||
secp256k1_scalar one;
|
||||
secp256k1_scalar msg, key;
|
||||
secp256k1_scalar sigr, sigs;
|
||||
int recid;
|
||||
int getrec;
|
||||
/* Initialize recid to suppress a false positive -Wconditional-uninitialized in clang.
|
||||
VG_UNDEF ensures that valgrind will still treat the variable as uninitialized. */
|
||||
int recid = -1; VG_UNDEF(&recid, sizeof(recid));
|
||||
random_scalar_order_test(&msg);
|
||||
random_scalar_order_test(&key);
|
||||
secp256k1_ecmult_gen(&ctx->ecmult_gen_ctx, &pubj, &key);
|
||||
|
||||
Reference in New Issue
Block a user