projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
296b35f
)
Cris Bailiff found this flaw, gethostbyname_r() on linux returns 0 even
author
Daniel Stenberg
<daniel@haxx.se>
Mon, 30 Sep 2002 08:07:16 +0000
(08:07 +0000)
committer
Daniel Stenberg
<daniel@haxx.se>
Mon, 30 Sep 2002 08:07:16 +0000
(08:07 +0000)
when it can't lookup the name (at least in some cases) and thus we need
to make an extra check to detect failures.
lib/hostip.c
patch
|
blob
|
history
diff --git
a/lib/hostip.c
b/lib/hostip.c
index
5876396
..
42cac05
100644
(file)
--- a/
lib/hostip.c
+++ b/
lib/hostip.c
@@
-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);