mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
bolt11: comment on weird assignment-then-check test.
Suggested-by: Christian Decker Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -269,6 +269,7 @@ static char *decode_c(struct bolt11 *b11,
|
|||||||
return tal_fmt(b11, "c: length %zu chars is excessive",
|
return tal_fmt(b11, "c: length %zu chars is excessive",
|
||||||
*data_len);
|
*data_len);
|
||||||
b11->min_final_cltv_expiry = c;
|
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)
|
if (b11->min_final_cltv_expiry != c)
|
||||||
return tal_fmt(b11, "c: %"PRIu64" is too large", c);
|
return tal_fmt(b11, "c: %"PRIu64" is too large", c);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user