mirror of
https://github.com/curl/curl.git
synced 2026-08-24 23:23:32 +03:00
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
This commit is contained in:
parent
68a5132474
commit
a2c85bb8e4
4 changed files with 27 additions and 23 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue