aboutsummaryrefslogtreecommitdiff
path: root/sunrpc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-06-30 17:41:35 +0000
committerUlrich Drepper <drepper@redhat.com>1999-06-30 17:41:35 +0000
commit1d863dc0b41da22b5a06110d67b47a0f102cb639 (patch)
tree3570b4ace8356ad2e0dd2ce8ab2edb900257203d /sunrpc
parentc11f120913b8c6a6be67ddf3dc36a3d239f2f322 (diff)
downloadglibc-1d863dc0b41da22b5a06110d67b47a0f102cb639.tar
glibc-1d863dc0b41da22b5a06110d67b47a0f102cb639.tar.gz
glibc-1d863dc0b41da22b5a06110d67b47a0f102cb639.tar.bz2
glibc-1d863dc0b41da22b5a06110d67b47a0f102cb639.zip
Update.
1999-06-30 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/gethostid.c: Handle failing call to getxxbyYY_r functions correctly for non-existing entry. * sunrpc/getrpcport.c: Likewise. * sunrpc/clnt_simp.c: Likewise. * inet/rexec.c: Likewise. * sunrpc/clnt_gen.c: Likewise. * inet/rcmd.c: Likewise. * sysdeps/generic/glob.c: Likewise.
Diffstat (limited to 'sunrpc')
-rw-r--r--sunrpc/clnt_gen.c6
-rw-r--r--sunrpc/clnt_simp.c3
-rw-r--r--sunrpc/getrpcport.c3
3 files changed, 8 insertions, 4 deletions
diff --git a/sunrpc/clnt_gen.c b/sunrpc/clnt_gen.c
index e8656eefc7..0f388572d4 100644
--- a/sunrpc/clnt_gen.c
+++ b/sunrpc/clnt_gen.c
@@ -78,7 +78,8 @@ clnt_create (const char *hostname, u_long prog, u_long vers,
hstbuflen = 1024;
hsttmpbuf = __alloca (hstbuflen);
while (__gethostbyname_r (hostname, &hostbuf, hsttmpbuf, hstbuflen,
- &h, &herr) != 0)
+ &h, &herr) != 0
+ || h == NULL)
if (herr != NETDB_INTERNAL || errno != ERANGE)
{
rpc_createerr.cf_stat = RPC_UNKNOWNHOST;
@@ -107,7 +108,8 @@ clnt_create (const char *hostname, u_long prog, u_long vers,
prtbuflen = 1024;
prttmpbuf = __alloca (prtbuflen);
- while (__getprotobyname_r (proto, &protobuf, prttmpbuf, prtbuflen, &p) != 0)
+ while (__getprotobyname_r (proto, &protobuf, prttmpbuf, prtbuflen, &p) != 0
+ || p == NULL)
if (errno != ERANGE)
{
rpc_createerr.cf_stat = RPC_UNKNOWNPROTO;
diff --git a/sunrpc/clnt_simp.c b/sunrpc/clnt_simp.c
index 41d106e570..e1e7e2ab73 100644
--- a/sunrpc/clnt_simp.c
+++ b/sunrpc/clnt_simp.c
@@ -105,7 +105,8 @@ callrpc (const char *host, u_long prognum, u_long versnum, u_long procnum,
buflen = 1024;
buffer = __alloca (buflen);
while (__gethostbyname_r (host, &hostbuf, buffer, buflen,
- &hp, &herr) != 0)
+ &hp, &herr) != 0
+ || hp == NULL)
if (herr != NETDB_INTERNAL || errno != ERANGE)
return (int) RPC_UNKNOWNHOST;
else
diff --git a/sunrpc/getrpcport.c b/sunrpc/getrpcport.c
index 188c668c1d..2e12482abc 100644
--- a/sunrpc/getrpcport.c
+++ b/sunrpc/getrpcport.c
@@ -56,7 +56,8 @@ getrpcport (const char *host, u_long prognum, u_long versnum, u_int proto)
buflen = 1024;
buffer = __alloca (buflen);
- while (__gethostbyname_r (host, &hostbuf, buffer, buflen, &hp, &herr) != 0)
+ while (__gethostbyname_r (host, &hostbuf, buffer, buflen, &hp, &herr) != 0
+ || hp == NULL)
if (herr != NETDB_INTERNAL || errno != ERANGE)
return 0;
else