diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2020-09-30 09:19:59 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-10-02 06:00:12 +0200 |
commit | c27b18eaaf675f2f96b41c1b92fe00ee3940de4d (patch) | |
tree | 86391ea9ad037463d35fda3c744bc43329990e6a /crypto/sha4.c | |
parent | 4dd5c073c750618054fd4366dcf141770559af46 (diff) | |
download | barebox-c27b18eaaf675f2f96b41c1b92fe00ee3940de4d.tar.gz barebox-c27b18eaaf675f2f96b41c1b92fe00ee3940de4d.tar.xz |
digest: sha: remove no-op "erase" of automatic variables
Some automatic variables are currently cleared as they may contain
"sensitive info". Any proper compiler would optimize away these
dead stores anyway, so just drop them.
Reported-by: clang-analyzer-10
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'crypto/sha4.c')
-rw-r--r-- | crypto/sha4.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/crypto/sha4.c b/crypto/sha4.c index aad8081fa5..a2e90c0a2c 100644 --- a/crypto/sha4.c +++ b/crypto/sha4.c @@ -124,9 +124,6 @@ sha512_transform(u64 *state, const u8 *input) state[0] += a; state[1] += b; state[2] += c; state[3] += d; state[4] += e; state[5] += f; state[6] += g; state[7] += h; - - /* erase our data */ - a = b = c = d = e = f = g = h = t1 = t2 = 0; } static int |