cURL / Mailing Lists / curl-library / Single Mail

curl-library

patch to prevent segfault on uClibc build

From: Vincent Sanders <vince_at_kyllikki.org>
Date: Wed, 20 Aug 2003 22:59:01 +0100

The attched patch is to improve libcurl handling of gethostbyname()
results when built with uClibc.

The symptoms are a segmentation fault when a host has no aliases.

This is because libc returns a pointer to an empty list if there are
no aliases returned from gethostbyname where uClibc returns a NULL
pointer. When hostcache_fixoffset() is called to fix up the returned
offsets it attempts to relocate the NULL pointer resulting in a seg
fault.

The patch also contains some comments on the #if #else structures to
make them a bit more followable.

-- 
Regards Vincent
http://www.kyllikki.org/

-------------------------------------------------------
This SF.net email is sponsored by Dice.com.
Did you know that Dice has over 25,000 tech jobs available today? From
careers in IT to Engineering to Tech Sales, Dice has tech jobs from the
best hiring companies. http://www.dice.com/index.epl?rel_code=104

  • application/pgp-signature attachment: stored
Received on 2003-08-21