cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl exception with bad url

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 23 Aug 2011 18:27:20 +0200 (CEST)

On Tue, 23 Aug 2011, Robert Navarro wrote:

> It would seem that I "fixed" it by removing the
>
> curl_easy_setopt(curl, CURLOPT_ERRORBUFFER);
>
> option. I will admit I am not sure exactly what this does, but I
> thought I needed it for information about why a connection failed.

Ouch, I didn't spot that but of course that would cause some serious errors.
You're supposed to provide a buffer to that option and as you didn't, libcurl
would write to some (seemingly) random pointer it would get from the stack...

A perfect explanation to the problem!

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-08-23