Commit fb55e28d authored by Wayne Davison's avatar Wayne Davison

Fixed the multiplying of blength*blength so that it can't overflow

before it gets cast to a uint64.
parent 067669da
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment