mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
Prevent a null pointer dereference in pw userdel when deleting
a user whose group != username.
This commit is contained in:
parent
2b89a04496
commit
605e5bbc41
1 changed files with 1 additions and 1 deletions
|
|
@ -425,7 +425,7 @@ pw_user(struct userconf * cnf, int mode, struct cargs * args)
|
|||
}
|
||||
|
||||
grp = GETGRNAM(a_name->val);
|
||||
if (*grp->gr_mem == NULL)
|
||||
if (grp != NULL && *grp->gr_mem == NULL)
|
||||
delgrent(GETGRNAM(a_name->val));
|
||||
SETGRENT();
|
||||
while ((grp = GETGRENT()) != NULL) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue