From 1cbb562c23f82cf667e0f9dc3b854d915459658d Mon Sep 17 00:00:00 2001 From: "ed@s5h.net" Date: Thu, 22 Aug 2019 18:18:31 +0100 Subject: [PATCH] lib/sgetgrent.c: change to warn when data remains --- lib/sgetgrent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sgetgrent.c b/lib/sgetgrent.c index 206f1c59..a951be42 100644 --- a/lib/sgetgrent.c +++ b/lib/sgetgrent.c @@ -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];