aboutsummaryrefslogtreecommitdiff
path: root/libexec/mknetid
diff options
context:
space:
mode:
authorBill Paul <wpaul@FreeBSD.org>1997-05-21 15:10:42 +0000
committerBill Paul <wpaul@FreeBSD.org>1997-05-21 15:10:42 +0000
commit48d26cf4106e28c6a7a4120f72668b37f98fe812 (patch)
tree80e466df73c5778baed30383aeb9e72ec7a16709 /libexec/mknetid
parente8adebf242bbf68acbc586743ac9d22dcaf86944 (diff)
downloadsrc-48d26cf4106e28c6a7a4120f72668b37f98fe812.tar.gz
src-48d26cf4106e28c6a7a4120f72668b37f98fe812.zip
Small tweak to the group parsing code to stop it from core dumping
on malformed /etc/group entries. This is a band-aid until I can pull in the newer group parsing code from getgrent . Pointed out by: branson@belmakor.hq.ferg.com (Branson Matheson)
Notes
Notes: svn path=/head/; revision=25969
Diffstat (limited to 'libexec/mknetid')
-rw-r--r--libexec/mknetid/parse_group.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libexec/mknetid/parse_group.c b/libexec/mknetid/parse_group.c
index 88a12028595d..e5fd7185fb04 100644
--- a/libexec/mknetid/parse_group.c
+++ b/libexec/mknetid/parse_group.c
@@ -36,7 +36,7 @@ static const char sccsid[] = "@(#)getgrent.c 8.2 (Berkeley) 3/21/94";
#endif /* LIBC_SCCS and not lint */
#ifndef lint
-static const char rcsid[] = "$Id$";
+static const char rcsid[] = "$Id: parse_group.c,v 1.3 1997/02/22 14:21:54 peter Exp $";
#endif
/*
@@ -141,6 +141,8 @@ grscan(search, gid, name)
if (search && name == NULL && _gr_group.gr_gid != gid)
continue;
cp = NULL;
+ if (bp == NULL) /* !! Must check for this! */
+ break;
for (m = _gr_group.gr_mem = members;; bp++) {
if (m == &members[MAXGRP - 1])
break;