From a431394ce37a3f647953969c85aac4415184a532 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 27 Mar 2011 20:03:23 +0200 Subject: s3: Fix Coverity ID 958: BAD_SIZEOF This is supposed to wipe out the md5 context, not only the first bytes of it. Others, please check! --- lib/crypto/md5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/md5.c b/lib/crypto/md5.c index e6178cc015..032474478e 100644 --- a/lib/crypto/md5.c +++ b/lib/crypto/md5.c @@ -144,7 +144,7 @@ _PUBLIC_ void MD5Final(uint8_t digest[16], struct MD5Context *ctx) MD5Transform(ctx->buf, (uint32_t *) ctx->in); byteReverse((uint8_t *) ctx->buf, 4); memmove(digest, ctx->buf, 16); - memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ + memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ } /* The four core functions - F1 is optimized somewhat */ -- cgit