cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: SFTP download of > 2GB

From: Julien Chaffraix <julien.chaffraix_at_gmail.com>
Date: Sat, 2 Oct 2010 13:39:51 -0700

Hi Daniel,

On Sat, Oct 2, 2010 at 12:46 PM, Adam Kellas <Adam.Kellas_at_gmail.com> wrote:
> On 10/2/2010 8:55 AM, Daniel Stenberg wrote:
>>
>> It seems that on _some_ servers we fail to download a file over SFTP if
>> the file size is larger than 2GB but smaller than 4GB. The size then
>> gets intepreted as negative and libcurl used to crash and now it bails
>> out. But the question is: why does it claim a negative file size?

I found several signed <-> unsigned conversion (usually int to size_t)
in the security.c code which motivated its rewrite (I fixed some and I
tried to flag the remaining conversions). For some reason, the
compiler will not output any warnings for these.
Such a conversion would not explain why only _some_ servers would show
that - that is unless not all the code branches are doing it.

>> The OpenSSH tool sftp seems to be able to transfer the files in all
>> these cases so there's something that involves libcurl+libssh2 that
>> trigger this weirdness.
>
> Do you also mean that the "curl" tool can download such files in unencrypted
> format without trouble?

Also does libcurl+openSSH work in this case?

Julien
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-10-02