diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 19:33:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 19:33:30 +0000 |
commit | c61e14d3a8412cd50d98aab604e607692c844c8a (patch) | |
tree | 4925aca0e6b64c8664ea2f3fdfa99a52dc93d5da /lib/sha1.c | |
parent | Adding upstream version 2.39.3. (diff) | |
download | util-linux-c61e14d3a8412cd50d98aab604e607692c844c8a.tar.xz util-linux-c61e14d3a8412cd50d98aab604e607692c844c8a.zip |
Adding upstream version 2.40.upstream/2.40
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/sha1.c')
-rw-r--r-- | lib/sha1.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -1,4 +1,7 @@ /* + * No copyright is claimed. This code is in the public domain; do with + * it what you wish. + * * SHA-1 in C by Steve Reid <steve@edmweb.com> * 100% Public Domain * @@ -153,7 +156,15 @@ void ul_SHA1Transform(uint32_t state[5], const unsigned char buffer[64]) state[3] += d; state[4] += e; /* Wipe variables */ +#ifdef HAVE_EXPLICIT_BZERO + explicit_bzero(&a, sizeof(a)); + explicit_bzero(&b, sizeof(b)); + explicit_bzero(&c, sizeof(c)); + explicit_bzero(&d, sizeof(d)); + explicit_bzero(&e, sizeof(e)); +#else a = b = c = d = e = 0; +#endif #ifdef UL_SHA1HANDSOFF memset(block, '\0', sizeof(block)); #endif |