diff options
author | Daniel Stenberg <daniel@haxx.se> | 2015-08-06 15:29:42 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2015-08-10 09:18:19 +0200 |
commit | ade6682f8d90164450ab64f3ac17f590206e1553 (patch) | |
tree | 87565c0d6047a4702f2d05f6100b05b3b049e247 /lib/ssh.c | |
parent | 002d58f1e8d8e725ba6d676599838983561feff9 (diff) | |
download | curl-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.c | 2 |
1 files changed, 1 insertions, 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); |