mirror of
https://github.com/curl/curl.git
synced 2024-12-09 06:30:06 +08:00
libssh: cap SFTP packet size sent
Due to libssh limitations Signed-off-by: Jakub Jelen <jjelen@redhat.com> Closes #11804
This commit is contained in:
parent
cb5ca39874
commit
35eb2614d8
@ -2567,6 +2567,12 @@ static ssize_t sftp_send(struct Curl_easy *data, int sockindex,
|
||||
struct connectdata *conn = data->conn;
|
||||
(void)sockindex;
|
||||
|
||||
/* limit the writes to the maximum specified in Section 3 of
|
||||
* https://datatracker.ietf.org/doc/html/draft-ietf-secsh-filexfer-02
|
||||
*/
|
||||
if(len > 32768)
|
||||
len = 32768;
|
||||
|
||||
nwrite = sftp_write(conn->proto.sshc.sftp_file, mem, len);
|
||||
|
||||
myssh_block2waitfor(conn, FALSE);
|
||||
|
Loading…
Reference in New Issue
Block a user