From b7774fcb0a19d9b0ebecea913ead05ab1f04689c Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 1 Nov 2017 10:10:09 +1030 Subject: [PATCH] bolt11: comment on weird assignment-then-check test. Suggested-by: Christian Decker Signed-off-by: Rusty Russell --- lightningd/bolt11.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lightningd/bolt11.c b/lightningd/bolt11.c index 79c03f2bb..aab05e09f 100644 --- a/lightningd/bolt11.c +++ b/lightningd/bolt11.c @@ -269,6 +269,7 @@ static char *decode_c(struct bolt11 *b11, return tal_fmt(b11, "c: length %zu chars is excessive", *data_len); b11->min_final_cltv_expiry = c; + /* Can overflow, since c is 64 bits but value must be < 32 bits */ if (b11->min_final_cltv_expiry != c) return tal_fmt(b11, "c: %"PRIu64" is too large", c);