mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-10-24 06:38:15 -04:00
Tweaked the calculation that goes into sum->count so that it cannot
overflow into a negative value (which is particularly important if configure didn't find a real int64 type).
This commit is contained in:
1 parent
f853b777be
commit
a5b786d80f
1 file changed
+2
-2
+2
-2
@@ -446,8 +446,8 @@ static void sum_sizes_sqroot(struct sum_struct *sum, int64 len)
|
||||
sum->flength = len;
|
||||
sum->blength = blength;
|
||||
sum->s2length = s2length;
|
||||
sum->count = (len + (blength - 1)) / blength;
|
||||
sum->remainder = (len % blength);
|
||||
sum->remainder = len % blength;
|
||||
sum->count = len / blength + (sum->remainder != 0);
|
||||
|
||||
if (sum->count && verbose > 2) {
|
||||
rprintf(FINFO,
|
||||
|
||||
Reference in new issue
Block a user