mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
Cris Bailiff found this flaw, gethostbyname_r() on linux returns 0 even
when it can't lookup the name (at least in some cases) and thus we need to make an extra check to detect failures.
This commit is contained in:
parent
296b35fe9b
commit
84fa12c885
@ -605,6 +605,8 @@ Curl_addrinfo *Curl_getaddrinfo(struct SessionHandle *data,
|
||||
&h_errnop))==ERANGE) {
|
||||
step_size+=200;
|
||||
}
|
||||
if(!h) /* failure */
|
||||
res=1;
|
||||
|
||||
#ifdef MALLOCDEBUG
|
||||
infof(data, "gethostbyname_r() uses %d bytes\n", step_size);
|
||||
|
Loading…
Reference in New Issue
Block a user