Skip to content

Commit 1c482b8

Browse files
committed
build: fix clear sizes and index type
1 parent ed29507 commit 1c482b8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/psbt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,7 +1196,7 @@ static int psbt_init(uint32_t version, size_t num_inputs, size_t num_outputs,
11961196
wally_free(psbt_out->inputs);
11971197
wally_free(psbt_out->outputs);
11981198
wally_map_clear(&psbt_out->unknowns);
1199-
wally_clear(psbt_out, sizeof(psbt_out));
1199+
wally_clear(psbt_out, sizeof(*psbt_out));
12001200
return ret != WALLY_OK ? ret : WALLY_ENOMEM;
12011201
}
12021202

@@ -3961,7 +3961,7 @@ static int psbt_build_input(const struct wally_psbt_input *src,
39613961
BUILD_ITEM(inflation_keys_rangeproof, PSET_IN_ISSUANCE_INFLATION_KEYS_RANGEPROOF);
39623962
struct wally_map_item issuance_amount_item = { NULL, 0, issuance_amount, sizeof(issuance_amount) };
39633963
struct wally_map_item inflation_keys_item = { NULL, 0, inflation_keys, sizeof(inflation_keys) };
3964-
int src_index = src->index;
3964+
uint32_t src_index = src->index;
39653965

39663966
if (src->issuance_amount || src->inflation_keys || issuance_amount_commitment || inflation_keys_commitment)
39673967
src_index |= WALLY_TX_ISSUANCE_FLAG;

src/sign.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ int wally_ec_sig_from_bytes_aux(const unsigned char *priv_key, size_t priv_key_l
359359
ret = WALLY_EINVAL;
360360
else if (!secp256k1_schnorrsig_sign32(ctx, bytes_out, bytes, &keypair, aux_rand))
361361
ret = WALLY_ERROR;
362-
wally_clear(&keypair, sizeof(&keypair));
362+
wally_clear(&keypair, sizeof(keypair));
363363
return ret;
364364
} else {
365365
unsigned char extra_entropy[32] = {0}, *entropy_p = (unsigned char *)aux_rand;

0 commit comments

Comments
 (0)