summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>2013-12-30 15:27:34 +0000
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>2013-12-30 15:27:34 +0000
commited81f3a98bf6c5e141e84514ca7c4ccddb82bc6b (patch)
tree85aa14e8d26bfb423e53d4b3612e6d4948c65967
parentf9fe2bba381311657ed93469ff05ee40e80bbfc2 (diff)
downloadlibpam-radius-auth-ed81f3a98bf6c5e141e84514ca7c4ccddb82bc6b.tar.gz
libpam-radius-auth-ed81f3a98bf6c5e141e84514ca7c4ccddb82bc6b.zip
We probably don't want to just set the first 4/8 bytes of ctx to 0
-rw-r--r--md5.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/md5.c b/md5.c
index 999318d..3d6bbc0 100644
--- a/md5.c
+++ b/md5.c
@@ -134,7 +134,7 @@ void MD5Update(struct MD5Context *ctx, unsigned const char *buf, unsigned len)
}
/*
- * Final wrapup - pad to 64-byte boundary with the bit pattern
+ * Final wrapup - pad to 64-byte boundary with the bit pattern
* 1 0* (64-bit count of bits processed, MSB-first)
*/
void MD5Final(unsigned char digest[16], struct MD5Context *ctx)
@@ -175,7 +175,7 @@ void MD5Final(unsigned char digest[16], struct MD5Context *ctx)
MD5Transform(ctx->buf, (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(*ctx)); /* In case it's sensitive */
}
#ifndef ASM_MD5