]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Another cast when multiplying integers.
authorWayne Davison <wayne@opencoder.net>
Tue, 5 Nov 2024 19:01:03 +0000 (11:01 -0800)
committerWayne Davison <wayne@opencoder.net>
Tue, 5 Nov 2024 19:01:03 +0000 (11:01 -0800)
rsync.h
sender.c

diff --git a/rsync.h b/rsync.h
index 8ddbe702e82b73b35dd6ded1b5184f8a2c7276de..0f9e277f40d6c175de81d1a2ed907b0acd5e2a4a 100644 (file)
--- a/rsync.h
+++ b/rsync.h
@@ -982,7 +982,7 @@ struct map_struct {
        int status;             /* first errno from read errors         */
 };
 
-#define sum2_at(s, i)  ((s)->sum2_array + ((OFF_T)(i) * xfer_sum_len))
+#define sum2_at(s, i)  ((s)->sum2_array + ((size_t)(i) * xfer_sum_len))
 
 #define NAME_IS_FILE           (0)    /* filter name as a file */
 #define NAME_IS_DIR            (1<<0) /* filter name as a dir */
index ab20534166ed3822d5b7fe07f0116a86ee390917..2bbff2faae83ada289bd6f305e2d3cbea681bfaf 100644 (file)
--- a/sender.c
+++ b/sender.c
@@ -95,7 +95,7 @@ static struct sum_struct *receive_sums(int f)
                return(s);
 
        s->sums = new_array(struct sum_buf, s->count);
-       s->sum2_array = new_array(char, s->count * xfer_sum_len);
+       s->sum2_array = new_array(char, (size_t)s->count * xfer_sum_len);
 
        for (i = 0; i < s->count; i++) {
                s->sums[i].sum1 = read_int(f);