Browse Source

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.
pull/843/head
Tor Didriksen 13 years ago
parent
commit
c94ca7d9cf
  1. 2
      mysys/md5.c

2
mysys/md5.c

@ -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

Loading…
Cancel
Save