From 3edb092bd8b557978ceddd29b48cb87abe3e3e9b Mon Sep 17 00:00:00 2001 From: Matt Morehouse Date: Wed, 12 Apr 2023 14:05:19 -0500 Subject: [PATCH] plugins: initialize destination_reachable Otherwise we later copy the uninitialized memory to descendants, triggering undefined behavior: plugins/libplugin-pay.c:2882:34: runtime error: load of value 190, which is not a valid value for type 'bool' --- plugins/libplugin-pay.c | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/libplugin-pay.c b/plugins/libplugin-pay.c index 4a605934832a..9996f99f7119 100644 --- a/plugins/libplugin-pay.c +++ b/plugins/libplugin-pay.c @@ -2928,6 +2928,7 @@ static struct routehints_data *routehint_data_init(struct payment *p) d->routehints = NULL; d->base = 0; d->offset = 0; + d->destination_reachable = false; return d; } return d;