cURL / Mailing Lists / curl-users / Single Mail

curl-users

segfault in curl_formfree() in persistence run on RHEL5 x86-64 as 64 bit app

From: Pinakin Mevawala <Pinakin_Mevawala_at_symantec.com>
Date: Wed, 16 Dec 2009 18:56:40 +0530

Hi,
const char POST_NAME[] = "message";
char* file_name = "xyz";
const char* content_type = "text/plain";

I'm facing the segfault in curl_formfree() in persistence run on RHEL5
x86-64 as 64 bit app. Using CURL 7.19.5.

 Call sequence is as below.
        curl_global_init()
   curl_formadd(&post, &last,
                 CURLFORM_COPYNAME, POST_NAME,
                 CURLFORM_FILECONTENT, file_name,
                 CURLFORM_CONTENTTYPE, (char*)content_type,
CURLFORM_END);
        curl_easy_init()
        curl_easy_setopt( curl, CURLOPT_USERAGENT, native_agent_header)
        curl_easy_setopt( curl, CURLOPT_TIMEOUT, config->http_timeout);
      set_curl_common_opts( curl, (struct curl_slist *)curl_headers,
keep_alive )
      set_curl_proxy_opts( curl, native_proxy_server,
native_proxy_user_passwd );
        bmi_set_curl_ssl_opts(curl, native_server_crt,
native_client_crt, NULL);
        curl_easy_setopt(curl, CURLOPT_HTTPPOST, post);
            perform_curl( curl, stats_https_url, fdevnull, 0, &http_code,
err_string );
   if(post != NULL)
    {
        curl_formfree( post );
    }
        curl_easy_cleanup(curl);
        curl_global_cleanup()

Thanks,
Pinakin

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-12-16