From 9943900813b7815d316f997b96fa1e7715fbd5d1 Mon Sep 17 00:00:00 2001 From: Michael Buesch Date: Mon, 29 Jul 2013 21:14:06 +0200 Subject: [PATCH] Fix memset size argument error. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Detected by gcc: md5.c: In function ‘MD5Final’: md5.c:245:26: warning: argument to ‘sizeof’ in ‘memset’ call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer-memaccess] Signed-off-by: Michael Buesch --- fwcutter/md5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fwcutter/md5.c b/fwcutter/md5.c index 9180964..e8270c3 100644 --- a/fwcutter/md5.c +++ b/fwcutter/md5.c @@ -242,5 +242,5 @@ void MD5Final(unsigned char *digest, struct MD5Context *ctx) MD5Transform(ctx->buf, ctx->u.in_u32); byteReverse((unsigned char *) ctx->buf, 4); memcpy(digest, ctx->buf, 16); - memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ + memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ } -- 2.31.1