Merge pull request #434 from JacobBarthelmeh/sftp-fixes

handle larger ext sizes with SFTP connect
pull/438/head
David Garske 2022-08-03 07:33:31 -07:00 committed by GitHub
commit 4405eba63d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -5064,7 +5064,7 @@ static int SFTP_ClientRecvInit(WOLFSSH* ssh) {
WFREE(data, ssh->ctx->heap, DYNTYPE_BUFFER);
/* case where expecting more */
if (len < ssh->sftpExtSz) {
if ((word32)len < ssh->sftpExtSz) {
ssh->sftpExtSz -= len;
ssh->error = WS_WANT_READ;
return WS_FATAL_ERROR;

View File

@ -669,7 +669,7 @@ struct WOLFSSH {
byte sftpState;
byte realState;
byte sftpInt;
byte sftpExtSz; /* size of extension buffer (buffer not currently used) */
word32 sftpExtSz; /* size of extension buffer (buffer not currently used) */
SFTP_OFST sftpOfst[WOLFSSH_MAX_SFTPOFST];
char* sftpDefaultPath;
#ifdef WOLFSSH_STOREHANDLE