Skip to content

Commit b5fcf54

Browse files
committed
f uninitialized memory in tests
1 parent 7e4ea97 commit b5fcf54

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/tests.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4318,6 +4318,7 @@ void test_xonly_pubkey_api(void) {
43184318
secp256k1_xonly_pubkey pk_tweaked;
43194319
secp256k1_pubkey xy_pk;
43204320
unsigned char sk[32];
4321+
unsigned char xy_sk[32];
43214322
unsigned char buf32[32];
43224323
unsigned char tweak[32];
43234324
int pk_is_positive;
@@ -4337,6 +4338,8 @@ void test_xonly_pubkey_api(void) {
43374338

43384339
secp256k1_rand256(sk);
43394340
secp256k1_rand256(tweak);
4341+
secp256k1_rand256(xy_sk);
4342+
CHECK(secp256k1_ec_pubkey_create(sign, &xy_pk, xy_sk) == 1);
43404343

43414344
ecount = 0;
43424345
CHECK(secp256k1_xonly_pubkey_create(none, &pk, sk) == 0);

0 commit comments

Comments
 (0)