]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
nis: nis_local_group may read from __nisgroup[-1] (bug 28075)
authorFlorian Weimer <fweimer@redhat.com>
Mon, 12 Jul 2021 05:58:07 +0000 (07:58 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 12 Jul 2021 05:58:07 +0000 (07:58 +0200)
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
nis/nis_local_names.c

index 080dcf88bd67d5d0cb9d76bca3cbd01ace39c863..218764f32e99ffc1064ff305c1dab8fc5b907a38 100644 (file)
@@ -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);