From f019dc3d710eb37f42c18962685dbc31ca3e5ba6 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 8 Oct 2019 13:02:33 +1030 Subject: [PATCH] lightningd: fix sizeof() argument correctly. c25ce826abc2a362eebb055c199e2bd693b5a13c claimed to fix this, but didn't; this is the correct fix. Signed-off-by: Rusty Russell --- lightningd/peer_htlcs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightningd/peer_htlcs.c b/lightningd/peer_htlcs.c index 8cbfea21e..f54d7f09a 100644 --- a/lightningd/peer_htlcs.c +++ b/lightningd/peer_htlcs.c @@ -1392,7 +1392,7 @@ static bool channel_added_their_htlc(struct channel *channel, /* FIXME: Our wire generator can't handle optional elems in arrays, * so we translate all-zero-shared-secret to NULL. */ - if (memeqzero(shared_secret, sizeof(shared_secret))) + if (memeqzero(shared_secret, sizeof(*shared_secret))) shared_secret = NULL; /* This stays around even if we fail it immediately: it *is*