mirror of
https://github.com/curl/curl.git
synced 2026-07-26 21:37:16 +03:00
fixup overflow-proof the check
This commit is contained in:
parent
c31e7d2725
commit
2e4358716c
1 changed files with 1 additions and 1 deletions
|
|
@ -345,7 +345,7 @@ void Curl_pgrsStartNow(struct Curl_easy *data)
|
|||
CURLcode Curl_pgrs_deliver_inc(struct Curl_easy *data, size_t delta)
|
||||
{
|
||||
if(data->set.max_filesize &&
|
||||
(data->progress.deliver + (curl_off_t)delta > data->set.max_filesize))
|
||||
((curl_off_t)delta > data->set.max_filesize - data->progress.deliver))
|
||||
return CURLE_FILESIZE_EXCEEDED;
|
||||
data->progress.deliver += delta;
|
||||
return CURLE_OK;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue