From 61b8078672233b6bbc24c67c4a909817fc7e878d Mon Sep 17 00:00:00 2001
From: Tim Rühsen <tim.ruehsen@gmx.de>
Date: Thu, 12 Dec 2019 16:07:08 +0100
Subject: [PATCH] * src/progress.c (dot_draw): Avoid integer overflow

---
 src/progress.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/progress.c b/src/progress.c
index 06750531..ecf0dc4f 100644
--- a/src/progress.c
+++ b/src/progress.c
@@ -386,7 +386,8 @@ dot_draw (void *progress)
       ++dp->dots;
       if (dp->dots >= opt.dots_in_line)
         {
-          ++dp->rows;
+          if (dp->rows < INT_MAX)
+            ++dp->rows;
           dp->dots = 0;
 
           print_row_stats (dp, dp->dltime, false);
-- 
2.19.1.windows.1

