From 569733267766c13330930bf7dcedc7c4c4e5f1a9 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Thu, 18 Jan 2018 07:23:15 +0100 Subject: [PATCH] Avoid potential NULL pointer dereference in wallet_payment_store(...) --- wallet/wallet.c | 1 + 1 file changed, 1 insertion(+) diff --git a/wallet/wallet.c b/wallet/wallet.c index 4e436b1be..40d29a6e0 100644 --- a/wallet/wallet.c +++ b/wallet/wallet.c @@ -1275,6 +1275,7 @@ void wallet_payment_store(struct wallet *wallet, struct wallet_payment *payment; payment = find_unstored_payment(wallet, payment_hash); + assert(payment); /* Don't attempt to add the same payment twice */ assert(!payment->id);