From 3c6823cad7c137b0116268d4062eefb6aaf48609 Mon Sep 17 00:00:00 2001 From: Thomas Pornin Date: Thu, 22 Jun 2017 23:15:17 +0200 Subject: [PATCH] Added an explicit initialisation to a stack buffer to prevent an (harmless) uninitialised read reported by valgrind. --- src/mac/hmac_ct.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mac/hmac_ct.c b/src/mac/hmac_ct.c index 3237885..e1c1d80 100644 --- a/src/mac/hmac_ct.c +++ b/src/mac/hmac_ct.c @@ -150,6 +150,7 @@ br_hmac_outCT(const br_hmac_context *ctx, * Hash state is obtained whenever we reach a full block. This * is the result we want if and only if u == kz. */ + memset(tmp2, 0, sizeof tmp2); for (u = 0; u < km; u ++) { uint32_t v; uint32_t d, e, x0, x1; -- 2.17.1