aboutsummaryrefslogtreecommitdiff
path: root/nis
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-09-25 07:09:36 +0000
committerUlrich Drepper <drepper@redhat.com>1999-09-25 07:09:36 +0000
commit079c00e64c9f6aafcd816790d49cb144d00a6a18 (patch)
tree605d9c1719330459b94eca01b07a30371cef3699 /nis
parenta164874646386e3bba4d0ac17e6e69033396363f (diff)
downloadglibc-079c00e64c9f6aafcd816790d49cb144d00a6a18.tar
glibc-079c00e64c9f6aafcd816790d49cb144d00a6a18.tar.gz
glibc-079c00e64c9f6aafcd816790d49cb144d00a6a18.tar.bz2
glibc-079c00e64c9f6aafcd816790d49cb144d00a6a18.zip
Update.
1999-09-24 Ulrich Drepper <drepper@cygnus.com> * nis/nss_nisplus/nisplus-parser.c (_nss_nisplus_parse_grent): Do not ovverwrite last group member with NULL pointer. Reported by Thomas Winder <thomas.winder@newlogic.at>.
Diffstat (limited to 'nis')
-rw-r--r--nis/nss_nisplus/nisplus-parser.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/nis/nss_nisplus/nisplus-parser.c b/nis/nss_nisplus/nisplus-parser.c
index 35b8a2881e..e8d107922b 100644
--- a/nis/nss_nisplus/nisplus-parser.c
+++ b/nis/nss_nisplus/nisplus-parser.c
@@ -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;