Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.4:Update
curl.31880
curl-libssh_Implement_SFTP_packet_size_limit.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File curl-libssh_Implement_SFTP_packet_size_limit.patch of Package curl.31880
From b9c8387c5ae3178d3eb65ad7b9d9683717d5012b Mon Sep 17 00:00:00 2001 From: Jakub Jelen <jjelen@redhat.com> Date: Tue, 5 Sep 2023 17:33:41 +0200 Subject: [PATCH] libssh: Implement SFTP packet size limit Signed-off-by: Jakub Jelen <jjelen@redhat.com> --- lib/vssh/libssh.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/vssh/libssh.c b/lib/vssh/libssh.c index dea0084575859b..ba2573ec052271 100644 --- a/lib/vssh/libssh.c +++ b/lib/vssh/libssh.c @@ -2567,6 +2567,11 @@ 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 + */ + len = len > 32768 ? 32768 : len; + nwrite = sftp_write(conn->proto.sshc.sftp_file, mem, len); myssh_block2waitfor(conn, FALSE);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor