aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nis/nis_local_names.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/nis/nis_local_names.c b/nis/nis_local_names.c
index 080dcf8..218764f 100644
--- a/nis/nis_local_names.c
+++ b/nis/nis_local_names.c
@@ -31,6 +31,7 @@ nis_local_group (void)
char *cptr;
if (__nisgroup[0] == '\0'
&& (cptr = getenv ("NIS_GROUP")) != NULL
+ && cptr[0] != '\0'
&& strlen (cptr) < NIS_MAXNAMELEN)
{
char *cp = stpcpy (__nisgroup, cptr);