fix uninitialised memory in merge_group_entries causes segfault in useradd by
changing a call to malloc to a call to calloc
This commit is contained in:
@@ -353,7 +353,7 @@ static /*@null@*/struct commonio_entry *merge_group_entries (
|
||||
members++;
|
||||
}
|
||||
}
|
||||
new_members = (char **)malloc ( (members+1) * sizeof(char*) );
|
||||
new_members = (char **)calloc ( (members+1), sizeof(char*) );
|
||||
if (NULL == new_members) {
|
||||
free (new_line);
|
||||
errno = ENOMEM;
|
||||
|
Reference in New Issue
Block a user