In the x11 example, sizeof(buf) = 8UL (on x86_64), when this should
probably represent the buffer size available. I am not sure how to
test that this change is actually correct, however.
Signed-off-by: Steven Dake <sdake_at_redhat.com>
--- example/x11.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/example/x11.c b/example/x11.c index 86dca0f..085b7be 100644 --- a/example/x11.c +++ b/example/x11.c @@ -208,7 +208,7 @@ static int x11_send_receive(LIBSSH2_CHANNEL *channel, int sock) rc = libssh2_poll(fds, nfds, 0); if (rc >0) { - rc = libssh2_channel_read(channel, buf,sizeof(buf)); + rc = libssh2_channel_read(channel, buf, bufsize); rc = write(sock, buf, rc); } -- 1.7.7.6 _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-develReceived on 2012-03-12