diff options
| author | Vincent JARDIN <vincent.jardin@6wind.com> | 2017-09-27 23:29:49 +0200 |
|---|---|---|
| committer | Vincent JARDIN <vincent.jardin@6wind.com> | 2017-10-02 09:14:03 +0200 |
| commit | 80a5a11bb13e572d05d197526e243c5889ddf39e (patch) | |
| tree | 9496b340b2bbb20ef8920d86be3590c562b3a8fb | |
| parent | 51dcd4c3760154739d359971c39f0746f2c536f1 (diff) | |
sha256: fix clang warning
t0 and t1 are not used, but want do really want them to be reset to secure
the stack.
Suggested by Quentin: let's use memset() to be consistent.
| -rw-r--r-- | lib/sha256.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sha256.c b/lib/sha256.c index a1b77901ee..e902021545 100644 --- a/lib/sha256.c +++ b/lib/sha256.c @@ -192,7 +192,8 @@ static void SHA256_Transform(uint32_t *state, const unsigned char block[64]) /* Clean the stack. */ memset(W, 0, 256); memset(S, 0, 32); - t0 = t1 = 0; + memset(t0, 0, sizeof(t0)); + memset(t1, 0, sizeof(t0)); } static unsigned char PAD[64] = { |
