supposed to have NGRPS elements.
2006-04-30 Ulrich Drepper <drepper@redhat.com>
+ * nis/nss_nisplus/nisplus-publickey.c (parse_grp_str): PIDLIST is
+ supposed to have NGRPS elements.
+
* nis/nss_nisplus/nisplus-parser.c: Minor optimizations and
cleanups. Avoid copying data if it can be used in the old place.
gidlen = 0;
/* After strtoul() ep should point to the marker ',', which means
- here starts a new value. */
- while (ep != NULL && *ep == ',')
+ here starts a new value.
+
+ The Sun man pages show that GIDLIST should contain at least NGRPS
+ elements. Limiting the number written by this value is the best
+ we can do. */
+ while (ep != NULL && *ep == ',' && gidlen < NGRPS)
{
ep++;
s = ep;