From 6af8adde26df07b3ba1de8077f69cb79f3b96967 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Sun, 3 Jan 2021 17:49:13 -0300 Subject: [PATCH] fix memset for route_hop json parsing when no channel_id exists. Changelog-None --- lightningd/pay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightningd/pay.c b/lightningd/pay.c index d8d4f887e..4f6408fba 100644 --- a/lightningd/pay.c +++ b/lightningd/pay.c @@ -1244,7 +1244,7 @@ param_route_hop(struct command *cmd, const char *name, const char *buffer, } if (!channeltok) { - memset(&res->channel_id, 0, sizeof(struct node_id)); + memset(&res->channel_id, 0, sizeof(struct short_channel_id)); } else if (!json_to_short_channel_id(buffer, channeltok, &res->channel_id)) { return command_fail_badparam(cmd, name, buffer, channeltok, "should be a short_channel_id");