[commit: base] master: md5.c: fix a typo in the size argument of memset (1ced18a)

Edward Z. Yang ezyang at MIT.EDU
Tue Apr 16 23:00:08 CEST 2013


Repository : ssh://darcs.haskell.org//srv/darcs/packages/base

On branch  : master

https://github.com/ghc/packages-base/commit/1ced18af54562a6bbc7c4711aeb9b4d21ffa0107

>---------------------------------------------------------------

commit 1ced18af54562a6bbc7c4711aeb9b4d21ffa0107
Author: Michal Terepeta <michal.terepeta at gmail.com>
Date:   Tue Apr 16 09:15:36 2013 +0200

    md5.c: fix a typo in the size argument of memset

>---------------------------------------------------------------

 cbits/md5.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/cbits/md5.c b/cbits/md5.c
index 0570cbb..c928316 100644
--- a/cbits/md5.c
+++ b/cbits/md5.c
@@ -130,7 +130,7 @@ MD5Final(byte digest[16], struct MD5Context *ctx)
 
 	byteSwap(ctx->buf, 4);
 	memcpy(digest, ctx->buf, 16);
-	memset(ctx,0,sizeof(ctx));
+	memset(ctx, 0, sizeof(*ctx));
 }
 
 





More information about the ghc-commits mailing list