From 2257f682c719ea0f865398fbc25002a0c4d5efcb Mon Sep 17 00:00:00 2001 From: Joost Jager Date: Tue, 24 Jun 2025 10:07:22 +0200 Subject: [PATCH] Fix multiplication overflow when logging hold times. With large reported hold times, the unit multiplication may exceed u32. --- lightning/src/ln/onion_utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightning/src/ln/onion_utils.rs b/lightning/src/ln/onion_utils.rs index 4dd6131515b..c2187ecf7b6 100644 --- a/lightning/src/ln/onion_utils.rs +++ b/lightning/src/ln/onion_utils.rs @@ -1226,7 +1226,7 @@ where logger, "Htlc hold time at pos {}: {} ms", route_hop_idx, - hold_time * HOLD_TIME_UNIT_MILLIS as u32 + (hold_time as u128) * HOLD_TIME_UNIT_MILLIS ); // Shift attribution data to prepare for processing the next hop.