From 55af02b1630513b52a40729a5044543e2fc5bf56 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Fri, 4 Oct 2019 13:43:05 +0200 Subject: [PATCH] wallet: Fix a column access size mismatch when reading tx types --- wallet/wallet.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wallet/wallet.c b/wallet/wallet.c index fa2015a73..fdcb554fe 100644 --- a/wallet/wallet.c +++ b/wallet/wallet.c @@ -2946,7 +2946,11 @@ bool wallet_transaction_type(struct wallet *w, const struct bitcoin_txid *txid, return false; } - *type = db_column_u64(stmt, 0); + if (!db_column_is_null(stmt, 0)) + *type = db_column_u64(stmt, 0); + else + *type = 0; + tal_free(stmt); return true; }