lib/sgetgrent.c: change to warn when data remains

This commit is contained in:
ed@s5h.net authored and Serge Hallyn committed 2019-10-04 18:30:41 -05:00
1 parent 558977bb2b
commit 1cbb562c23
1 file changed
+1 -1
+1 -1
View File
@@ -136,7 +136,7 @@ struct group *sgetgrent (const char *buf)
cp++;
}
}
if (i < (NFIELDS - 1) || *grpfields[2] == '\0') {
if (i < (NFIELDS - 1) || *grpfields[2] == '\0' || cp != NULL) {
return (struct group *) 0;
}
grent.gr_name = grpfields[0];