summaryrefslogtreecommitdiff
path: root/inet/rexec.c
diff options
context:
space:
mode:
Diffstat (limited to 'inet/rexec.c')
-rw-r--r--inet/rexec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/inet/rexec.c b/inet/rexec.c
index 6ba7d20f71..897030e6b9 100644
--- a/inet/rexec.c
+++ b/inet/rexec.c
@@ -64,7 +64,8 @@ rexec(ahost, rport, name, pass, cmd, fd2p)
hstbuflen = 1024;
hsttmpbuf = __alloca (hstbuflen);
while (__gethostbyname_r (*ahost, &hostbuf, hsttmpbuf, hstbuflen,
- &hp, &herr) != 0)
+ &hp, &herr) != 0
+ || hp == NULL)
if (herr != NETDB_INTERNAL || errno != ERANGE)
{
__set_h_errno (herr);