Subject: Re: proper buffer size for libssh2_sftp_read()

Re: proper buffer size for libssh2_sftp_read()

From: Daniel Stenberg <>
Date: Sun, 19 Jun 2011 23:37:24 +0200 (CEST)

On Fri, 17 Jun 2011, zl liu wrote:

> I mean before the first -7 error message is print, the function call stack
> is:
> libssh2.dll!send_existing
> libssh2.dll!_libssh2_transport_send
> libssh2.dll!_libssh2_channel_receive_window_adjust
> libssh2.dll!_libssh2_channel_read

> As you see data != p->odata, so the function send_existing() will

Okay, so the real question is then how send_existing() ends up detecting that
it gets called with another buffer than before, as it isn't supposed to.

It would indicate a bug in a parent function but I couldn't detect one now and
also this seems to work most of the time so it probably has to be some special
condition to trigger it.

Unfortunately I can't repeat this problem in my end so I have a hard time
helping out with the debugging.

Received on 2011-06-19