diff options
author | Sam Hartman <hartmans@debian.org> | 2024-12-02 09:55:34 -0700 |
---|---|---|
committer | Sam Hartman <hartmans@debian.org> | 2024-12-02 09:55:34 -0700 |
commit | 7c9fb6472dcfae34ddbf4fbc9ecfafae2cf173c3 (patch) | |
tree | b04aa8c3b2354427cbba730ccc832249f7244985 /modules/pam_timestamp/sha1.c | |
parent | e9aa2ef52a423a3a33299bf7e8715eb5bd76ea67 (diff) | |
parent | ea980d991196df67cdd56b3f65d210b73218d08a (diff) | |
download | pam-7c9fb6472dcfae34ddbf4fbc9ecfafae2cf173c3.tar.gz pam-7c9fb6472dcfae34ddbf4fbc9ecfafae2cf173c3.tar.bz2 pam-7c9fb6472dcfae34ddbf4fbc9ecfafae2cf173c3.zip |
New upstream version 1.7.0
Diffstat (limited to 'modules/pam_timestamp/sha1.c')
-rw-r--r-- | modules/pam_timestamp/sha1.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/pam_timestamp/sha1.c b/modules/pam_timestamp/sha1.c index d713aed1..f21b2870 100644 --- a/modules/pam_timestamp/sha1.c +++ b/modules/pam_timestamp/sha1.c @@ -37,6 +37,7 @@ */ /* See http://www.itl.nist.gov/fipspubs/fip180-1.htm for descriptions. */ +#include "pam_inline.h" #include <sys/types.h> #include <sys/stat.h> #include <netinet/in.h> @@ -48,7 +49,7 @@ #include <unistd.h> #include "sha1.h" -static unsigned char +static const unsigned char padding[SHA1_BLOCK_SIZE] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -142,8 +143,8 @@ sha1_process(struct sha1_context *ctx, uint32_t buffer[SHA1_BLOCK_SIZE / 4]) ctx->d += d; ctx->e += e; - memset(buffer, 0, sizeof(buffer[0]) * SHA1_BLOCK_SIZE / 4); - memset(data, 0, sizeof(data)); + pam_overwrite_n(buffer, sizeof(buffer[0]) * SHA1_BLOCK_SIZE / 4); + pam_overwrite_array(data); } void |