diff options
Diffstat (limited to 'grp')
-rw-r--r-- | grp/fgetgrent_r.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/grp/fgetgrent_r.c b/grp/fgetgrent_r.c index f8b8d97d25..d8a8bfb2e1 100644 --- a/grp/fgetgrent_r.c +++ b/grp/fgetgrent_r.c @@ -34,7 +34,10 @@ LINE_PARSER (, STRING_FIELD (result->gr_name, ISCOLON, 0); STRING_FIELD (result->gr_passwd, ISCOLON, 0); - INT_FIELD (result->gr_gid, ISCOLON, 0, 10,); + if (result->gr_name[0] == '+' || result->gr_name[0] == '-') + INT_FIELD_MAYBE_NULL (result->gr_gid, ISCOLON, 0, 10, , 0) + else + INT_FIELD (result->gr_gid, ISCOLON, 0, 10,) ) |