summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent JARDIN <vincent.jardin@6wind.com>2017-09-27 23:29:49 +0200
committerVincent JARDIN <vincent.jardin@6wind.com>2017-10-02 09:14:03 +0200
commit80a5a11bb13e572d05d197526e243c5889ddf39e (patch)
tree9496b340b2bbb20ef8920d86be3590c562b3a8fb
parentMerge pull request #1260 from donaldsharp/logrotate (diff)
downloadfrr-80a5a11bb13e572d05d197526e243c5889ddf39e.tar.xz
frr-80a5a11bb13e572d05d197526e243c5889ddf39e.zip
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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sha256.c b/lib/sha256.c
index a1b77901e..e90202154 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] = {