diff options
author | Arran Cudbard-Bell <a.cudbardb@freeradius.org> | 2013-12-30 15:27:34 +0000 |
---|---|---|
committer | Arran Cudbard-Bell <a.cudbardb@freeradius.org> | 2013-12-30 15:27:34 +0000 |
commit | ed81f3a98bf6c5e141e84514ca7c4ccddb82bc6b (patch) | |
tree | 85aa14e8d26bfb423e53d4b3612e6d4948c65967 | |
parent | f9fe2bba381311657ed93469ff05ee40e80bbfc2 (diff) | |
download | libpam-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |