From: David Barksdale Date: Fri, 18 Nov 2016 02:22:22 +0000 (-0600) Subject: Avoid undefined left-shift X-Git-Tag: taler-0.2.0~2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cdeb1253bfda209def1ef48b436ff09cf7ab8be6;p=oweals%2Fgnunet.git Avoid undefined left-shift --- 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 */