mirror of
https://github.com/curl/curl.git
synced 2026-07-16 02:27:16 +03:00
libssh/libssh2: return error on too big range
If trying to get the range 0 - 2^63 and the remote file is 2^63 bytes or larger. Fixes #12983 Closes #12984
This commit is contained in:
parent
7448054c38
commit
f47487c219
2 changed files with 4 additions and 0 deletions
|
|
@ -1665,6 +1665,8 @@ static CURLcode myssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
size = 0;
|
||||
}
|
||||
else {
|
||||
if((to - from) == CURL_OFF_T_MAX)
|
||||
return CURLE_RANGE_ERROR;
|
||||
size = to - from + 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2544,6 +2544,8 @@ static CURLcode ssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
size = 0;
|
||||
}
|
||||
else {
|
||||
if((to - from) == CURL_OFF_T_MAX)
|
||||
return CURLE_RANGE_ERROR;
|
||||
size = to - from + 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue