mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-10-20 12:54:15 -04:00
Fixed the multiplying of blength*blength so that it can't overflow
before it gets cast to a uint64.
This commit is contained in:
1 parent
067669dac7
commit
fb55e28d83
1 file changed
+1
-1
+1
-1
@@ -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 */
|
||||
|
||||
Reference in new issue
Block a user