mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-30 09:14:59 +02:00
Handle Android libc returning NULL pw->pw_passwd
Reported by Luke Dashjr
This commit is contained in:
parent
5953c14300
commit
be2866d620
2
misc.c
2
misc.c
@ -445,7 +445,7 @@ pwcopy(struct passwd *pw)
|
||||
struct passwd *copy = xcalloc(1, sizeof(*copy));
|
||||
|
||||
copy->pw_name = xstrdup(pw->pw_name);
|
||||
copy->pw_passwd = xstrdup(pw->pw_passwd);
|
||||
copy->pw_passwd = xstrdup(pw->pw_passwd == NULL ? "*" : pw->pw_passwd);
|
||||
#ifdef HAVE_STRUCT_PASSWD_PW_GECOS
|
||||
copy->pw_gecos = xstrdup(pw->pw_gecos);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user