]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(_nss_nisplus_parse_grent): Do not ovverwrite last group member with NULL
authorUlrich Drepper <drepper@redhat.com>
Sat, 25 Sep 1999 07:02:10 +0000 (07:02 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 25 Sep 1999 07:02:10 +0000 (07:02 +0000)
pointer.

nis/nss_nisplus/nisplus-parser.c

index 35b8a2881e11d8cb2ad8870186c175dc595f77b3..e8d107922bffed5baf3dda4c6cdd85015dadb5e7 100644 (file)
@@ -231,9 +231,9 @@ _nss_nisplus_parse_grent (nis_result *result, u_long entry, struct group *gr,
        break;
 
       if (room_left < sizeof (char *))
-         goto no_more_room;
+       goto no_more_room;
       room_left -= sizeof (char *);
-      gr->gr_mem[count] = line;
+      gr->gr_mem[count++] = line;
 
       while (*line != '\0' && *line != ',' && !isspace (*line))
        ++line;
@@ -248,13 +248,10 @@ _nss_nisplus_parse_grent (nis_result *result, u_long entry, struct group *gr,
              ++line;
          else
            ++line;
-         ++count;
        }
-      else
-       gr->gr_mem[count+1] = NULL;
     }
   if (room_left < sizeof (char *))
-      goto no_more_room;
+    goto no_more_room;
   room_left -= sizeof (char *);
   gr->gr_mem[count] = NULL;