Skip to content

Commit

Permalink
psbt: Fix psbt linseraize_input bug
Browse files Browse the repository at this point in the history
Some fields weren’t intitialized causing complex crashes elsewhere.

Changelog-None
  • Loading branch information
ddustin authored and rustyrussell committed Jul 31, 2023
1 parent 50fe819 commit 81a738c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions common/psbt_open.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ static const u8 *linearize_input(const tal_t *ctx,
psbt->inputs[0].taproot_leaf_paths.num_items = 0;
psbt->inputs[0].keypaths.num_items = 0;
psbt->inputs[0].signatures.num_items = 0;
psbt->inputs[0].utxo = NULL;
psbt->inputs[0].witness_utxo = NULL;

const u8 *bytes = psbt_get_bytes(ctx, psbt, &byte_len);

Expand Down

0 comments on commit 81a738c

Please sign in to comment.