[openssh-commits] [openssh] 01/01: Handle Android libc returning NULL pw->pw_passwd
git+noreply at mindrot.org
git+noreply at mindrot.org
Mon May 17 09:41:59 AEST 2021
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit be2866d6207b090615ff083c9ef212b603816a56
Author: Damien Miller <djm at mindrot.org>
Date: Mon May 17 09:40:23 2021 +1000
Handle Android libc returning NULL pw->pw_passwd
Reported by Luke Dashjr
---
misc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/misc.c b/misc.c
index b0ece244..36f26ccb 100644
--- a/misc.c
+++ b/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
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list