mirror of
https://github.com/curl/curl.git
synced 2024-11-27 05:50:21 +08:00
SFTP: fix range request off-by-one in size check
Reported-by: Tim Stack Closes #359
This commit is contained in:
parent
002d58f1e8
commit
ade6682f8d
@ -2144,7 +2144,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
|
||||
/* from is relative to end of file */
|
||||
from += size;
|
||||
}
|
||||
if(from >= size) {
|
||||
if(from > size) {
|
||||
failf(data, "Offset (%"
|
||||
CURL_FORMAT_CURL_OFF_T ") was beyond file size (%"
|
||||
CURL_FORMAT_CURL_OFF_T ")", from, attrs.filesize);
|
||||
|
Loading…
Reference in New Issue
Block a user