cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Crash in curl

From: Andreas Volz <lists_at_brachttal.net>
Date: Mon, 18 Feb 2008 23:45:34 +0100

Am Mon, 18 Feb 2008 09:03:10 +0100 schrieb Linus Nielsen Feltzing:

> Andreas Volz wrote:
> > int Download::webget (const string &url, const string &filename)
> > {
> > long httpResponse;
> >
> > // specify URL to get
> > curl_easy_setopt(m_curlHandle, CURLOPT_URL, url.c_str ());
>
> If you are using version 7.16.4, this statement might cause a problem
> if the c_str() method creates a temporary char pointer. However,
> 7.17.1 will not have that problem, since it copies the string.

Ok, but I have that stl string at this point. I could copy it to a
temporary char*. But how long should I hold it in memory for curl?

Beside I'll test 7.17.1.

regards
Andreas
Received on 2008-02-18