cURL / Mailing Lists / curl-users / Single Mail

curl-users

Function gethostbyname gives "Array Bound Write" error in Purify

From: Dany Orr <danyorr_at_mercury.co.il>
Date: Tue, 15 Apr 2003 17:38:26 +0300

Hello all,

 

I run into a problem I can't resolve and would need your assistants and
knowledge with gethostbyname function.

 

During purify tests of my code I got an "Array Bound Write" error.

Trying to isolate the problem I found that running cURL simple.c example
has the same error.

Actually, running any example that use gethostbyname got the same error
(find error log below).

 

Now I'm puzzled is purify wrong or there a problem with gethostbyname?

Do you have any information on this problem?

 

Thanks you for your time,

 

Dany Orr

 

----------

 

Test Information:

OS: Windows2000 server

Purify ver.: 2002.05.20 build 4425

Test code: cURL simple.c example.

cURL ver.: 7.10.4

 

 

Purify Log

[E] ABW: Array bounds write in WideCharToMultiByte {1 occurrence}

        Writing 65535 bytes to 0x00172280 (65522 bytes at 0x0017228d
illegal)

        Address 0x00172280 is argument #5 of WideCharToMultiByte

        Address 0x00172280 is at the beginning of a 13 byte block

        Address 0x00172280 points to a Global/LocalAlloc'd block

        Thread ID: 0x8ec

        Error location

            WideCharToMultiByte [KERNEL32.dll]

            my_getaddrinfo [hostip.c:739]

                    }

                #else

                  else {

             => if ((h = gethostbyname(hostname)) == NULL ) {

                      infof(data, "gethostbyname(2) failed for %s\n",
hostname);

                      *bufp=NULL;

                    }

            Curl_resolv [hostip.c:263]

            CreateConnection [url.c:2796]

            Curl_connect [url.c:2950]

            Curl_perform [transfer.c:1647]

            curl_easy_perform [easy.c:247]

            main [curl_test.cpp:22]

            mainCRTStartup [crt0.c:206]

 

________________________________________________________________________
This email has been scanned for all viruses.

Mercury Interactive Corporation
Optimizing Business Processes to Maximize Business Results

http://www.merc-int.com
________________________________________________________________________

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-04-15