curl-library
Re: curl_easy_perform crash in Curl_do after Curl_reconnect_request has been called
Date: Tue, 25 Sep 2012 13:29:45 -0700 (PDT)
Hi,
I have the similar issue for 7.21.1. At first, I debugged it and found the crash was caused by using the variable conn which was already freed. So I did the research and found this thread. I downloaded 7.27.0 and checked the codes again but I think there still is a protential problem. In
CURLcode Curl_reconnect_request(structconnectdata **connp)
{
...
result = Curl_done(&conn, result, FALSE);
...
for some cases, Curl_done() could free the memory which is assigned to *connp and only set conn to NULL but not *connp which becomes a bad address and it may cause the crash later.
Should we add the following line after returning from Curl_done()?
if(!conn)
*connp = NULL;
Thanks,
Ho-chi Chen
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-09-25