From fb55e28d83ab11c17b8932019362a8926598efcd Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Fri, 22 Aug 2003 05:42:13 +0000 Subject: [PATCH] Fixed the multiplying of blength*blength so that it can't overflow before it gets cast to a uint64. --- generator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator.c b/generator.c index f2e7c71d..48273f0c 100644 --- a/generator.c +++ b/generator.c @@ -155,7 +155,7 @@ static void sum_sizes_sqroot_baarda(struct sum_struct *sum, uint64 len) blength = 0; do { blength |= c; - if (len < (uint64)(blength * blength)) + if (len < (uint64)blength * blength) blength &= ~c; c >>= 1; } while (c >= 8); /* round to multiple of 8 */ -- 2.34.1