SFTP: fix range request off-by-one in size check
Reported-by: Tim Stack Closes #359
This commit is contained in:
@@ -2144,7 +2144,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
|
|||||||
/* from is relative to end of file */
|
/* from is relative to end of file */
|
||||||
from += size;
|
from += size;
|
||||||
}
|
}
|
||||||
if(from >= size) {
|
if(from > size) {
|
||||||
failf(data, "Offset (%"
|
failf(data, "Offset (%"
|
||||||
CURL_FORMAT_CURL_OFF_T ") was beyond file size (%"
|
CURL_FORMAT_CURL_OFF_T ") was beyond file size (%"
|
||||||
CURL_FORMAT_CURL_OFF_T ")", from, attrs.filesize);
|
CURL_FORMAT_CURL_OFF_T ")", from, attrs.filesize);
|
||||||
|
|||||||
Reference in New Issue
Block a user