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:
parent
63188dcd61
commit
f5bae6c177
|
@ -129,7 +129,7 @@ MD5Final(md5byte digest[16], struct MD5Context *ctx)
|
|||
|
||||
byteSwap(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
|
||||
|
|
Loading…
Reference in New Issue