[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug when doing a ssh_channel_read with no contents
[Thread Prev] | [Thread Next]
- Subject: Re: Bug when doing a ssh_channel_read with no contents
- From: Andreas Schneider <asn@xxxxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Fri, 14 Jun 2019 15:52:40 +0200
- To: libssh@xxxxxxxxxx
- Cc: Alex Zhang <zhang.sb.2009@xxxxxxxxx>
On Friday, May 31, 2019 2:54:36 AM CEST Alex Zhang wrote: > Hey all, Hi Alex, > I think I found a bug when reading the output of a remotely executed command > is 0 bytes (ie “ls” in an empty directory). > > The ssh_channel_read should return 0 bytes, but the callback > “channel_rcv_close” automatically sets the state to be > SSH_CHANNEL_STATE_CLOSED which then causes in ssh_channel_read_timeout to > return SSH_ERROR because of this line of code: > > https://git.libssh.org/projects/libssh.git/tree/src/channels.c > <https://git.libssh.org/projects/libssh.git/tree/src/channels.c> Line 2897. I'm not 100% sure if this is a bug. The question is what impact it might have returning 0. Can you open a bug report? Thanks, Andreas -- Andreas Schneider asn@xxxxxxxxxxxxxx GPG-ID: 8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D
Archive administrator: postmaster@lists.cynapses.org