From 68d8c5d5a51609e61505188ac1752055720a5003 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 23 Jul 2020 14:20:10 +0930 Subject: [PATCH] paymod: fix typo which can cause memory overrun. Signed-off-by: Rusty Russell --- plugins/libplugin-pay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/libplugin-pay.c b/plugins/libplugin-pay.c index b4f612cd1..9a0d101e3 100644 --- a/plugins/libplugin-pay.c +++ b/plugins/libplugin-pay.c @@ -1756,7 +1756,7 @@ static bool routehint_excluded(struct payment *p, * are suggesting we use it the other way. Very unlikely though! */ for (size_t i = 0; i < tal_count(routehint); i++) { const struct route_info *r = &routehint[i]; - for (size_t j=0; tal_count(nodes); j++) + for (size_t j = 0; j < tal_count(nodes); j++) if (node_id_eq(&r->pubkey, &nodes[j])) return true;