From 1d863dc0b41da22b5a06110d67b47a0f102cb639 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 30 Jun 1999 17:41:35 +0000 Subject: Update. 1999-06-30 Ulrich Drepper * 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. --- sunrpc/clnt_gen.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sunrpc/clnt_gen.c') diff --git a/sunrpc/clnt_gen.c b/sunrpc/clnt_gen.c index e8656ee..0f38857 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; -- cgit v1.1