diff options
author | Damien Miller <djm@mindrot.org> | 2012-04-26 09:51:26 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2012-04-26 09:51:26 +1000 |
commit | 7584cb1ac4daafbfb3dec592dd7ef48b81d20eea (patch) | |
tree | b758ad859d530f5b4e22d3c7dce55465d8c6b090 /auth-passwd.c | |
parent | ba77e1f67311fc76fe7ce460f7f03b6528383cbc (diff) |
- (djm) [auth-passwd.c] Handle crypt() returning NULL; from Paul Wouters
via Niels
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 b1c6ce092..68bbd18dd 100644 --- a/auth-passwd.c +++ b/auth-passwd.c | |||
@@ -209,6 +209,7 @@ sys_auth_passwd(Authctxt *authctxt, const char *password) | |||
209 | * Authentication is accepted if the encrypted passwords | 209 | * Authentication is accepted if the encrypted passwords |
210 | * are identical. | 210 | * are identical. |
211 | */ | 211 | */ |
212 | return (strcmp(encrypted_password, pw_password) == 0); | 212 | return encrypted_password != NULL && |
213 | strcmp(encrypted_password, pw_password) == 0; | ||
213 | } | 214 | } |
214 | #endif | 215 | #endif |