Bug#16626742 IN MY_MD5FINAL IN MYSYS/MD5.C, CTX IS NOT PROPERLY ZEROED AS INTENDED

Zero out the entire struct, rather than the first sizeof(void*) bytes.
This commit is contained in:
Tor Didriksen 2013-04-17 09:26:51 +02:00
parent 899b219e05
commit c94ca7d9cf

View file

@ -176,7 +176,7 @@ my_MD5Final (unsigned char digest[16], my_MD5Context *ctx)
putu32(ctx->buf[1], digest + 4);
putu32(ctx->buf[2], digest + 8);
putu32(ctx->buf[3], digest + 12);
memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
}
#ifndef ASM_MD5