Subject: Re: libssh2 for SFTP

Re: libssh2 for SFTP

From: Daniel Stenberg <daniel_at_haxx.se>
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)<Xuan.Shangguan_at_fujixerox.com> 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.

-- 
  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2009-08-24