group_info_gid & group_info_name core dumped when the input parameter was

bogus. Fixed.
    -Olin
This commit is contained in:
shivers 2000-02-11 04:39:49 +00:00
parent 294994dcf2
commit 400bc57c41
1 changed files with 6 additions and 6 deletions

View File

@ -91,9 +91,9 @@ int group_info_gid (int gid, char **name, char ***members, int *nmembers)
{
struct group *grp = getgrgid(gid);
if( !grp ) {
name = 0;
members = 0;
nmembers = 0;
*name = 0;
*members = 0;
*nmembers = 0;
return 0;
}
*name = grp->gr_name;
@ -107,9 +107,9 @@ int group_info_name (const char *name,
{
struct group *grp = getgrnam(name);
if( !grp ) {
gid = 0;
members = 0;
nmembers = 0;
*gid = 0;
*members = 0;
*nmembers = 0;
return 0;
}
*gid = grp->gr_gid;