curl-library
Re: 7.16.0 regression with large files
Date: Thu, 11 Jan 2007 19:42:45 +0100 (CET)
On Thu, 11 Jan 2007, Matt Witherspoon wrote:
> I can't personally test it, but I have an idea what the problem is. I
> noticed this while fixing the double-copy patch I made -- Curl_read()
> expects a size_t sizerequested. On my system, size_t is only 4 bytes long.
> Try printing out that sizerequested value in the function -- it is called
> with the total expected file size remaining. So if you're requesting a 100MB
> file, you'll find that variable will be 100000000.
Check again. That fourth argument to Curl_read() is the largest amount of data
that is allowed to be read in that call into the given buffer. Since the
buffer we use is 16K, 'sizerequested' should never be larger than that...
If not, I would say you've found a case where that function is badly used.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2007-01-11