summary refs log tree commit diff
path: root/sysdeps/posix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-07-01 21:13:35 +0000
committerUlrich Drepper <drepper@redhat.com>1999-07-01 21:13:35 +0000
commitc5f57c58cae865ec63448282295bb078fc935d39 (patch)
treeb43d57610de7ab644aec06ed14019087ae84f7e8 /sysdeps/posix
parent1d863dc0b41da22b5a06110d67b47a0f102cb639 (diff)
downloadglibc-c5f57c58cae865ec63448282295bb078fc935d39.tar.gz
glibc-c5f57c58cae865ec63448282295bb078fc935d39.tar.xz
glibc-c5f57c58cae865ec63448282295bb078fc935d39.zip
Update.
1999-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* inet/rcmd.c (__icheckhost): Fix typo in last patch.

1999-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* wcsmbs/wcschr.c (wcschr): Fix last patch: Add missing semicolon.
	* wcsmbs/wcsrchr.c (wcsrchr): Likewise.

1999-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* posix/wordexp.c (parse_tilde): Handle failing call to
	get.*_r functions correctly for non-existing entry.
	* sysdeps/posix/cuserid.c (cuserid): Likewise.
	* sysdeps/posix/getaddrinfo.c (gaih_inet_serv): Likewise.
Diffstat (limited to 'sysdeps/posix')
-rw-r--r--sysdeps/posix/cuserid.c5
-rw-r--r--sysdeps/posix/getaddrinfo.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/sysdeps/posix/cuserid.c b/sysdeps/posix/cuserid.c
index 68de92ae64..5d9ef83c33 100644
--- a/sysdeps/posix/cuserid.c
+++ b/sysdeps/posix/cuserid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1996, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1996, 1998, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -34,7 +34,8 @@ cuserid (s)
   struct passwd pwent;
   struct passwd *pwptr;
 
-  if (__getpwuid_r (__geteuid (), &pwent, buf, sizeof (buf), &pwptr))
+  if (__getpwuid_r (__geteuid (), &pwent, buf, sizeof (buf), &pwptr)
+      || pwptr == NULL)
     {
       if (s != NULL)
 	s[0] = '\0';
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index f43aa03d1f..6810963357 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -206,7 +206,7 @@ gaih_inet_serv (const char *servicename, struct gaih_typeproto *tp,
 
       r = __getservbyname_r (servicename, tp->name, &ts, tmpbuf, tmpbuflen,
 			     &s);
-      if (r)
+      if (r || s == NULL)
 	{
 	  if (errno == ERANGE)
 	    tmpbuflen *= 2;