LIBSSH2_SFTP_PACKET_MAXLEN: increase to 80000

Some SFTP servers send SFTP packets larger than 40000. Since the limit
is only present to avoid insane sizes anyway, we can easily bump it.

The define was formerly in the public header libssh2_sftp.h but served
no external purpose and was moved into the source dir.

Bug: http://www.libssh2.org/mail/libssh2-devel-archive-2011-11/0004.shtml
Reported by: Michael Harris
This commit is contained in:
Daniel Stenberg 2011-11-18 22:53:21 +01:00
parent fed94fa85d
commit 4f61824908
2 changed files with 4 additions and 1 deletions

View File

@ -54,7 +54,6 @@ extern "C" {
* Let's start with Version 3 (The version found in OpenSSH) and go from there
*/
#define LIBSSH2_SFTP_VERSION 3
#define LIBSSH2_SFTP_PACKET_MAXLEN 40000
typedef struct _LIBSSH2_SFTP LIBSSH2_SFTP;
typedef struct _LIBSSH2_SFTP_HANDLE LIBSSH2_SFTP_HANDLE;

View File

@ -89,6 +89,10 @@
#define SSH_FXE_STATVFS_ST_RDONLY 0x00000001
#define SSH_FXE_STATVFS_ST_NOSUID 0x00000002
/* This is the maximum packet length to accept, as larger than this indicate
some kind of server problem. */
#define LIBSSH2_SFTP_PACKET_MAXLEN 80000
static int sftp_close_handle(LIBSSH2_SFTP_HANDLE *handle);
static int sftp_packet_ask(LIBSSH2_SFTP *sftp, unsigned char packet_type,
uint32_t request_id, unsigned char **data,