Commit ade6682f authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

SFTP: fix range request off-by-one in size check

Reported-by: Tim Stack

Closes #359
parent 002d58f1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);