mirror of
https://github.com/curl/curl.git
synced 2026-08-04 19:56:13 +03: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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue