diff options
author | Tomas Mraz <tmraz@fedoraproject.org> | 2014-06-19 13:51:20 +0200 |
---|---|---|
committer | Tomas Mraz <tmraz@fedoraproject.org> | 2014-06-19 13:51:20 +0200 |
commit | aff9b0f2b67eac784c99536fede9423da66f194a (patch) | |
tree | 7bd2cc5840ce155e3adcac2f7d04ee482020113c /modules/pam_unix/pam_unix_passwd.c | |
parent | 696d4cc68fb60461081e5f29c6ef3094feebac8d (diff) | |
download | pam-aff9b0f2b67eac784c99536fede9423da66f194a.tar.gz pam-aff9b0f2b67eac784c99536fede9423da66f194a.tar.bz2 pam-aff9b0f2b67eac784c99536fede9423da66f194a.zip |
pam_unix: Check for NULL return from Goodcrypt_md5().
modules/pam_unix/pam_unix_passwd.c (check_old_password): Check for
NULL return from Goodcrypt_md5().
Diffstat (limited to 'modules/pam_unix/pam_unix_passwd.c')
-rw-r--r-- | modules/pam_unix/pam_unix_passwd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/pam_unix/pam_unix_passwd.c b/modules/pam_unix/pam_unix_passwd.c index 606071ea..2d330e51 100644 --- a/modules/pam_unix/pam_unix_passwd.c +++ b/modules/pam_unix/pam_unix_passwd.c @@ -301,7 +301,7 @@ static int check_old_password(const char *forwho, const char *newpass) s_pas = strtok_r(NULL, ":,", &sptr); while (s_pas != NULL) { char *md5pass = Goodcrypt_md5(newpass, s_pas); - if (!strcmp(md5pass, s_pas)) { + if (md5pass == NULL || !strcmp(md5pass, s_pas)) { _pam_delete(md5pass); retval = PAM_AUTHTOK_ERR; break; |