summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/ssh-libssh.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/ssh-libssh.c b/lib/ssh-libssh.c
index 9e6667295..34ef490c4 100644
--- a/lib/ssh-libssh.c
+++ b/lib/ssh-libssh.c
@@ -2425,8 +2425,7 @@ static ssize_t sftp_recv(struct connectdata *conn, int sockindex,
ssize_t nread;
(void)sockindex;
- if(len >= (size_t)1<<32)
- len = (size_t)(1<<31)-1;
+ DEBUGASSERT(len < CURL_MAX_READ_SIZE);
switch(conn->proto.sshc.sftp_recv_state) {
case 0: