From cdeb1253bfda209def1ef48b436ff09cf7ab8be6 Mon Sep 17 00:00:00 2001 From: David Barksdale Date: Thu, 17 Nov 2016 20:22:22 -0600 Subject: [PATCH] Avoid undefined left-shift --- src/fragmentation/fragmentation.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/fragmentation/fragmentation.c b/src/fragmentation/fragmentation.c index 21bbc538d..eb0bad675 100644 --- a/src/fragmentation/fragmentation.c +++ b/src/fragmentation/fragmentation.c @@ -258,9 +258,13 @@ transmit_next (void *cls) fsize); else delay = GNUNET_TIME_UNIT_ZERO; - delay = GNUNET_TIME_relative_max (delay, - GNUNET_TIME_relative_multiply (fc->msg_delay, - (1ULL << fc->num_rounds))); + if (fc->num_rounds < 64) + delay = GNUNET_TIME_relative_max (delay, + GNUNET_TIME_relative_multiply + (fc->msg_delay, + (1ULL << fc->num_rounds))); + else + delay = GNUNET_TIME_UNIT_FOREVER_REL; if (wrap) { /* full round transmitted wait 2x delay for ACK before going again */ -- 2.25.1