summaryrefslogtreecommitdiff
path: root/lib/progress.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-08-24 11:07:59 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-08-28 14:16:41 +0200
commita2c85bb8e4ba9fa94b88c7592766763e30379ed2 (patch)
tree1d13ea2d5984bbe625a1cdc33b994bfc00e6815d /lib/progress.h
parent68a51324740945f1da9758bc1d26bbe4835bd847 (diff)
downloadcurl-a2c85bb8e4ba9fa94b88c7592766763e30379ed2.tar.gz
Curl_pgrsTime - return new time to avoid timeout integer overflow
Setting a timeout to INT_MAX could cause an immediate error to get returned as timeout because of an overflow when different values of 'now' were used. This is primarily fixed by having Curl_pgrsTime() return the "now" when TIMER_STARTSINGLE is set so that the parent function will continue using that time. Reported-by: IonuČ›-Francisc Oancea Fixes #5583 Closes #5847
Diffstat (limited to 'lib/progress.h')
-rw-r--r--lib/progress.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/progress.h b/lib/progress.h
index 3515ac6d5..c19d966d3 100644
--- a/lib/progress.h
+++ b/lib/progress.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -49,7 +49,7 @@ void Curl_pgrsSetUploadCounter(struct Curl_easy *data, curl_off_t size);
void Curl_ratelimit(struct Curl_easy *data, struct curltime now);
int Curl_pgrsUpdate(struct connectdata *);
void Curl_pgrsResetTransferSizes(struct Curl_easy *data);
-void Curl_pgrsTime(struct Curl_easy *data, timerid timer);
+struct curltime Curl_pgrsTime(struct Curl_easy *data, timerid timer);
timediff_t Curl_pgrsLimitWaitTime(curl_off_t cursize,
curl_off_t startsize,
curl_off_t limit,