From 2460396391a17b6dc44c493d21fe921604a16cda Mon Sep 17 00:00:00 2001 From: Garrett Wollman Date: Sat, 28 Jul 2012 00:26:44 -0400 Subject: [PATCH] pam: Use the right password variable in pam_sm_chauthtok() "password" is known to be null at this point. Use "prompt_password" which is obviously the one intended. Change-Id: I4ab566f93c4978438df2c2875d619177ad8f5bdd Reviewed-on: http://gerrit.openafs.org/7892 Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- src/pam/afs_password.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pam/afs_password.c b/src/pam/afs_password.c index d282902..547e723 100644 --- a/src/pam/afs_password.c +++ b/src/pam/afs_password.c @@ -192,7 +192,7 @@ pam_sm_chauthtok(pam_handle_t * pamh, int flags, int argc, const char **argv) */ strncpy(my_password_buf, prompt_password, sizeof(my_password_buf)); my_password_buf[sizeof(my_password_buf) - 1] = '\0'; - memset(prompt_password, 0, strlen(password)); + memset(prompt_password, 0, strlen(prompt_password)); free(prompt_password); password = torch_password = my_password_buf; } -- 1.9.4