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

Reply via email to