aboutsummaryrefslogtreecommitdiff
path: root/modules/pam_timestamp/hmac_openssl_wrapper.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pam_timestamp/hmac_openssl_wrapper.c')
-rw-r--r--modules/pam_timestamp/hmac_openssl_wrapper.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/pam_timestamp/hmac_openssl_wrapper.c b/modules/pam_timestamp/hmac_openssl_wrapper.c
index a59a8de2..b2aeda21 100644
--- a/modules/pam_timestamp/hmac_openssl_wrapper.c
+++ b/modules/pam_timestamp/hmac_openssl_wrapper.c
@@ -105,6 +105,7 @@ generate_key(pam_handle_t *pamh, char **key, size_t key_size)
if (bytes_read < 0 || (size_t)bytes_read < key_size) {
pam_syslog(pamh, LOG_ERR, "Short read on random device");
+ pam_overwrite_n(tmp, key_size);
free(tmp);
return PAM_AUTH_ERR;
}
@@ -192,6 +193,7 @@ write_file(pam_handle_t *pamh, const char *file_name, char *text,
if (bytes_written < 0 || (size_t)bytes_written < text_length) {
pam_syslog(pamh, LOG_ERR, "Short write on %s", file_name);
+ pam_overwrite_n(text, text_length);
free(text);
return PAM_AUTH_ERR;
}