diff options
Diffstat (limited to 'auth-passwd.c')
-rw-r--r-- | auth-passwd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/auth-passwd.c b/auth-passwd.c index b1c6ce09..68bbd18d 100644 --- a/auth-passwd.c +++ b/auth-passwd.c @@ -209,6 +209,7 @@ sys_auth_passwd(Authctxt *authctxt, const char *password) * Authentication is accepted if the encrypted passwords * are identical. */ - return (strcmp(encrypted_password, pw_password) == 0); + return encrypted_password != NULL && + strcmp(encrypted_password, pw_password) == 0; } #endif |