cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: stack overflow

From: T. Bharath <TBharath_at_responsenetworks.com>
Date: Tue, 11 Sep 2001 03:05:56 -0400

scratch[BUFSIZE * 2] is what it reads . BUFSIZE is 1024*50
I understand that the second buffer in the urlstruct is heap based

> < 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