summaryrefslogtreecommitdiff
path: root/lib/ssh.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2015-08-06 15:29:42 +0200
committerDaniel Stenberg <daniel@haxx.se>2015-08-10 09:18:19 +0200
commitade6682f8d90164450ab64f3ac17f590206e1553 (patch)
tree87565c0d6047a4702f2d05f6100b05b3b049e247 /lib/ssh.c
parent002d58f1e8d8e725ba6d676599838983561feff9 (diff)
downloadcurl-ade6682f8d90164450ab64f3ac17f590206e1553.tar.gz
SFTP: fix range request off-by-one in size check
Reported-by: Tim Stack Closes #359
Diffstat (limited to 'lib/ssh.c')
-rw-r--r--lib/ssh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ssh.c b/lib/ssh.c
index 7b0e57c2c..94195a7b6 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -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);