Correctly memset the MD5Context when done with it. We want to zero out the whole struct, not just the size of its pointer.

This commit is contained in:
Lioncash 2013-12-25 16:03:26 -05:00
parent 63188dcd61
commit f5bae6c177
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ MD5Final(md5byte digest[16], struct MD5Context *ctx)
byteSwap(ctx->buf, 4); byteSwap(ctx->buf, 4);
memcpy(digest, ctx->buf, 16); 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 #ifndef ASM_MD5