[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug when doing a ssh_channel_read with no contents


Hey all,

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.

Thanks
Alex

Archive administrator: postmaster@lists.cynapses.org