Skip to content

wolfsftp.c: WS_FATAL_ERROR upon WS_WANT_WRITE #737

@dgoldbr

Description

@dgoldbr

Hi!

I am wondering - aren't WS_WANT_READ/WRITE non-fatal errors by design? See here:

wolfssh/src/wolfsftp.c

Lines 411 to 419 in ceb4618

/* A few errors are OK to get. They are a notice rather that a fault.
* return TRUE if ssh->error is one of the following: */
static INLINE int NoticeError(WOLFSSH* ssh)
{
return (ssh->error == WS_WANT_READ ||
ssh->error == WS_WANT_WRITE ||
ssh->error == WS_CHAN_RXD ||
ssh->error == WS_REKEYING);
}

But what about this:

wolfssh/src/wolfsftp.c

Lines 1573 to 1577 in ceb4618

if (wolfSSH_SFTP_buffer_idx(&state->buffer)
< wolfSSH_SFTP_buffer_size(&state->buffer)) {
ssh->error = WS_WANT_WRITE;
return WS_FATAL_ERROR;
}

Thanks!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions