From 81a738c7cc054a631abffeff94ba9854a122f720 Mon Sep 17 00:00:00 2001 From: Dustin Dettmer Date: Sat, 4 Mar 2023 19:43:34 -0500 Subject: [PATCH] psbt: Fix psbt linseraize_input bug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some fields weren’t intitialized causing complex crashes elsewhere. Changelog-None --- common/psbt_open.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/psbt_open.c b/common/psbt_open.c index 1bc250cc7..fbd2e9c40 100644 --- a/common/psbt_open.c +++ b/common/psbt_open.c @@ -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);