[openssh-commits] [openssh] 02/02: check for NULL return from shadow_pw()

git+noreply at mindrot.org git+noreply at mindrot.org
Thu Oct 11 11:03:59 AEDT 2018


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit fe8e8f349a553ef4c567acd418aac769a82b7729
Author: Damien Miller <djm at mindrot.org>
Date:   Thu Oct 11 11:03:15 2018 +1100

    check for NULL return from shadow_pw()
    
    probably unreachable on this platform; pointed out by
    coolbugcheckers AT gmail.com
---
 openbsd-compat/port-uw.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/openbsd-compat/port-uw.c b/openbsd-compat/port-uw.c
index 9edb1b48..13221313 100644
--- a/openbsd-compat/port-uw.c
+++ b/openbsd-compat/port-uw.c
@@ -60,6 +60,9 @@ sys_auth_passwd(struct ssh *ssh, const char *password)
 	/* Just use the supplied fake password if authctxt is invalid */
 	char *pw_password = authctxt->valid ? shadow_pw(pw) : pw->pw_passwd;
 
+	if (pw_password == NULL)
+		return 0;
+
 	/* Check for users with no password. */
 	if (strcmp(pw_password, "") == 0 && strcmp(password, "") == 0)
 		return (1);

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list