cURL / Mailing Lists / curl-library / Single Mail

curl-library

exception in version 7.10.2

From: Juan Ignacio Hervás <jihervas_at_iies.es>
Date: Fri, 22 Nov 2002 17:24:56 +0200

Hi,
I was working with version 7.10 and today I have downloaded the new version
curl-7.10.2.zip. I have compiled the new library (Win32 and Visual C++ 6.0)
and when I run my application I get the known exception "0xC0000005: Access
Violation"in url.c (line 1639).
I have tried to debug the libcurl code and I have found that it is trying
to execute line 1639:

    Curl_addrinfo *hostaddr=dns->addr;

with a NULL pointer in the 'dns' .

I have compare the code between 7.10 and 7.10.2 and I think that this line
has been added just to construct the info string in the next few lines:

     struct in_addr in;
     (void) memcpy(&in.s_addr, &conn->serv_addr.sin_addr, sizeof (in.s_addr));
     infof(data, "Connected to %s (%s) port %d\n",
     "test",
           hostaddr?hostaddr->h_name:"",
#if defined(HAVE_INET_NTOA_R)
           inet_ntoa_r(in, ntoa_buf, sizeof(ntoa_buf)),
#else
           inet_ntoa(in),
#endif
           conn->port);

So, is there a problem in my code? is possible to have a NULL pointer in
this variable or this means that something is wrong?
If I comment the line 1639 and modify 1644 (hostaddr?hostaddr->h_name:""),
everything is working fine (at least it think so).

Thanks in advance.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2002-11-22