MD5: fix wrong memset
authorWilfried Goesgens <dothebart@citadel.org>
Sun, 10 Feb 2013 15:10:37 +0000 (16:10 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 10 Feb 2013 15:10:37 +0000 (16:10 +0100)
citadel/md5.c

index 6e50570cc2fa659644c85b362bd5c515bd3f69d4..9d0b4421e7e90fb83092942a268de4d6474285a5 100644 (file)
@@ -150,7 +150,7 @@ void MD5Final(unsigned char digest[16], struct MD5Context *ctx)
     MD5Transform(ctx->buf, (cit_uint32_t *) ctx->in);
     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(struct MD5Context)); /* In case it's sensitive */
 }
 
 #ifndef ASM_MD5