Subject: Re: sftp problem reading large directories

Re: sftp problem reading large directories

From: E L <crc1021_at_gmail.com>
Date: Wed, 14 Mar 2012 09:22:35 -0500

On Tue, Mar 13, 2012 at 10:49 AM, Peter Stuge <peter_at_stuge.se> wrote:
> E L wrote:
>> Something appears to get corrupted because after receiving about
>> 650k out of 15M, one packet length comes back completely bogus.
>>
>> [libssh2] 14.210771 Transport: Packet type 94 received, length=118
>> [libssh2] 14.210771 Conn: 109 bytes packet_add() for 0/0/0
>> [libssh2] 14.210771 Conn: channel_read() got 2009 of data from 0/0/0
>> [libssh2] 14.210771 SFTP: Received packet 60 (len 2009)
>> [libssh2] 14.210771 SFTP: recv packet
>> [libssh2] 14.210771 Conn: channel_read() got 4 of data from 0/0/0
>> [libssh2] 14.210771 SFTP: Data begin - Packet Length: 1668048225
>> [libssh2] 14.210771 Failure Event: -25 - SFTP packet too large
>
> Unfortunately this is fairly useless output. Please set trace level
> to ~0 and send complete debug output. Thanks!
>
>
>> I'm not sure if this is the cause of what I'm seeing, but if the code
>> in sftp_packet_read() jumps to window_adjust, the packet buffer will
>> not be initialized but the execution can still continue to where
>> packet is used.
>
> Do you have a simple fix? :)

Daniel was already quick with the fix. Thanks.

Eric
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-03-14