cURL / Mailing Lists / curl-library / Single Mail


Re: curl_easy_perform results in segmentation fault

From: Linus Nielsen Feltzing <>
Date: Fri, 23 Apr 2010 16:28:13 +0200

On 2010-04-23 16:14, Marcus Mundt wrote:
> strcat(data, "server_ip=");

First of all, you should read up on the printf() and sprintf()
functions, it will save you a lot of printf() and strcat() calls.


        printf("CURLOPT_ERRORBUFFER - temp2 = ");

can be written like this instead:

        printf("CURLOPT_ERRORBUFFER - temp2 = %s", temp2);

 From your pastebin source code:

                data = (char*)calloc(100, sizeof(char));

You are overflowing this buffer with the strcat() calls. Increase the
size and try again.

List admin:
Received on 2010-04-23