commit aff9b0f2b67eac784c99536fede9423da66f194a
Author: Tomas Mraz <tmraz(a)fedoraproject.org>
Date: Thu Jun 19 13:51:20 2014 +0200
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().
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 606071e..2d330e5 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;
Show replies by thread