curl-library
Re: stack overflow
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 11 Sep 2001 08:51:50 +0200 (MET DST)
Date: Tue, 11 Sep 2001 08:51:50 +0200 (MET DST)
On Tue, 11 Sep 2001, T. Bharath wrote:
> So far i found that Transfer() has a buffer, scratch of size 1024*50*2
> (100k).
Why *2?
> In the UrlState struct there is a buffer of size (1024*50 + 1) (50k) I
> think these are the main culprits.
There's a 50K transfer buffer, yes. It's used for both downloading and
uploading purposes. But it isn't stack based. The whole 'SessionHandle'
struct (in which UrlState is a sub-struct) is malloc()ed and is the CURL
handle that the application holds and passes to libcurl in all libcurl
function calls.
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/Received on 2001-09-11