From: Ulrich Drepper Date: Sat, 25 Sep 1999 07:02:10 +0000 (+0000) Subject: (_nss_nisplus_parse_grent): Do not ovverwrite last group member with NULL X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0efcbb3a2f12cb7c36cef8d2fd682094682a10a4;p=thirdparty%2Fglibc.git (_nss_nisplus_parse_grent): Do not ovverwrite last group member with NULL pointer. --- diff --git a/nis/nss_nisplus/nisplus-parser.c b/nis/nss_nisplus/nisplus-parser.c index 35b8a2881e1..e8d107922bf 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;