Subject: Re: libssh2 for SFTP

Re: libssh2 for SFTP

From: Daniel Stenberg <>
Date: Mon, 24 Aug 2009 11:55:50 +0200 (CEST)

On Mon, 24 Aug 2009, Tor Arntsen wrote:

> On Mon, Aug 24, 2009 at 08:01, Shangguan, Xuan
> (FXSGSC)<> wrote:
>> debug1: Sending subsystem: sftp
>> Received message too long 1399157876
> That number looks suspicious, and it seems to be some ASCII data
> instead of a number.
> In hex it's 0x53657474, which is "Sett" in ASCII.
> There are several _libssh2_debug() calls in channel.c and session.c
> which prints "Setting ..", so my guess is that the value seen is the
> first four bytes (as in size of an integer) from one of those strings.
> So, invalid memory access somewhere.

Oh, nice catch.

So running this with valgrind (since it is on Linux after all) could be a
useful experiment to see if that traps something bad.

Received on 2009-08-24