From: Richard Kettlewell Date: Sat, 10 Dec 2011 16:13:18 +0000 (+0000) Subject: md5: correct size arg to memset(). X-Git-Tag: v0.2.0~7 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=secnet.git;a=commitdiff_plain;h=dfa6ab137e7565bd1afc03b045fff4aa737a7c9e;ds=inline md5: correct size arg to memset(). On realistic targets the effect of the error was that the MD5 context wasn't fully cleared. Signed-off-by: Richard Kettlewell --- diff --git a/md5.c b/md5.c index 2e0b9b8..343ad8f 100644 --- a/md5.c +++ b/md5.c @@ -129,7 +129,7 @@ MD5Final(md5byte digest[16], struct MD5Context *ctx) byteSwap(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 */ } #ifndef ASM_MD5