Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/wolfsftp.c
Original file line number Diff line number Diff line change
Expand Up @@ -6374,6 +6374,16 @@ static int SFTP_ClientRecvInit(WOLFSSH* ssh) {
}

ato32(buf + LENGTH_SZ + MSG_ID_SZ, &version);
/* The server is supposed to reply with the lower of its own and
* our version, so a value above ours is a non-conforming server. In
* that case we continue on with the same v3 version. If the server
* replies with a version before v3 then return early here since
* there will be SSH_FXP_STATUS incompatibility issues. */
if (version < WOLFSSH_SFTP_VERSION) {
WLOG(WS_LOG_SFTP, "Unsupported SFTP version from server");
return WS_VERSION_E;
}

sz = sz - MSG_ID_SZ - UINT32_SZ;
ssh->sftpExtSz = sz;
ssh->sftpState = SFTP_EXT;
Expand Down
Loading