Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed the multiplying of blength*blength so that it can't overflow
[rsync/rsync.git]
/
generator.c
diff --git
a/generator.c
b/generator.c
index
812fef4
..
48273f0
100644
(file)
--- 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;
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 */
blength &= ~c;
c >>= 1;
} while (c >= 8); /* round to multiple of 8 */
@@
-383,7
+383,7
@@
void recv_generator(char *fname, struct file_list *flist, int i, int f_out)
if (am_root && preserve_devices && IS_DEVICE(file->mode)) {
if (statret != 0 ||
st.st_mode != file->mode ||
if (am_root && preserve_devices && IS_DEVICE(file->mode)) {
if (statret != 0 ||
st.st_mode != file->mode ||
- st.st_rdev != file->rdev) {
+
(DEV64_T)
st.st_rdev != file->rdev) {
delete_file(fname);
if (verbose > 2)
rprintf(FINFO,"mknod(%s,0%o,0x%x)\n",
delete_file(fname);
if (verbose > 2)
rprintf(FINFO,"mknod(%s,0%o,0x%x)\n",