Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3]: src/lib/libc/gen Pull up revision 1.28 (requested by lukem in...
details: https://anonhg.NetBSD.org/src/rev/18fe6badcf60
branches: netbsd-3
changeset: 576519:18fe6badcf60
user: tron <tron%NetBSD.org@localhost>
date: Sat Jul 09 22:50:21 2005 +0000
description:
Pull up revision 1.28 (requested by lukem in ticket #533):
check for pwd != NULL
diffstat:
lib/libc/gen/__glob13.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (37 lines):
diff -r ff255755cdf3 -r 18fe6badcf60 lib/libc/gen/__glob13.c
--- a/lib/libc/gen/__glob13.c Sat Jul 09 22:48:00 2005 +0000
+++ b/lib/libc/gen/__glob13.c Sat Jul 09 22:50:21 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: __glob13.c,v 1.25.6.2 2005/04/04 18:02:33 tron Exp $ */
+/* $NetBSD: __glob13.c,v 1.25.6.3 2005/07/09 22:50:21 tron Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93";
#else
-__RCSID("$NetBSD: __glob13.c,v 1.25.6.2 2005/04/04 18:02:33 tron Exp $");
+__RCSID("$NetBSD: __glob13.c,v 1.25.6.3 2005/07/09 22:50:21 tron Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -427,7 +427,7 @@
if ((pwd = getpwuid(getuid())) == NULL)
#else
if (getpwuid_r(getuid(), &pwres, pwbuf, sizeof(pwbuf),
- &pwd) != 0)
+ &pwd) != 0 || pwd == NULL)
#endif
return pattern;
else
@@ -441,7 +441,8 @@
#ifdef NO_GETPW_R
if ((pwd = getpwnam(d)) == NULL)
#else
- if (getpwnam_r(d, &pwres, pwbuf, sizeof(pwbuf), &pwd) != 0)
+ if (getpwnam_r(d, &pwres, pwbuf, sizeof(pwbuf), &pwd) != 0 ||
+ pwd == NULL)
#endif
return pattern;
else
Home |
Main Index |
Thread Index |
Old Index