diff options
| author | Bill Paul <wpaul@FreeBSD.org> | 1995-03-23 22:21:16 +0000 |
|---|---|---|
| committer | Bill Paul <wpaul@FreeBSD.org> | 1995-03-23 22:21:16 +0000 |
| commit | 62a771700f5b785340b54378157d74deeb175530 (patch) | |
| tree | 6e6a85afa0d6cdcc76e68fc6e9975aea6555a93f /lib/libc/gen/getnetgrent.c | |
| parent | 353fefe325490cc210ecc0b72a1f4c7ecf0dbe43 (diff) | |
Notes
Diffstat (limited to 'lib/libc/gen/getnetgrent.c')
| -rw-r--r-- | lib/libc/gen/getnetgrent.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libc/gen/getnetgrent.c b/lib/libc/gen/getnetgrent.c index a7ab735c0cd6..68e5ebda39b2 100644 --- a/lib/libc/gen/getnetgrent.c +++ b/lib/libc/gen/getnetgrent.c @@ -96,6 +96,10 @@ void setnetgrent(group) char *group; { + /* Sanity check: no null group names allowed! */ + + if (group == NULL || *group == '\0') + return; if (grouphead.gr == (struct netgrp *)0 || strcmp(group, grouphead.grname)) { endnetgrent(); |
