From: Vincent JARDIN Date: Wed, 27 Sep 2017 21:29:49 +0000 (+0200) Subject: sha256: fix clang warning X-Git-Tag: frr-4.0-dev~252^2~3 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=80a5a11bb13e572d05d197526e243c5889ddf39e;p=matthieu%2Ffrr.git 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. --- 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] = {