Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions various.c
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,7 @@ uid2name(uid_t uid)
this->uname = malloc(len+1);
ptrverify(this->uname, "Malloc failed for u2n name\n");

strcpy(this->uname, pwd->pw_name);
safe_strcpy(this->uname, pwd->pw_name, len+1);
}

endpwent();
Expand Down Expand Up @@ -1172,7 +1172,7 @@ gid2name(gid_t gid)
this->gname = malloc(len+1);
ptrverify(this->gname, "Malloc failed for g2n name\n");

strcpy(this->gname, group->gr_name);
safe_strcpy(this->gname, group->gr_name, len+1);
}

endgrent();
Expand Down