mirror of
https://github.com/curl/curl.git
synced 2025-01-24 14:15:18 +08: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
@ -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…
Reference in New Issue
Block a user