From c94ca7d9cf0463a190872de9ee38be6c507e2474 Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Wed, 17 Apr 2013 09:26:51 +0200 Subject: [PATCH] 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. --- mysys/md5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysys/md5.c b/mysys/md5.c index 7179359d213..655befa546a 100644 --- a/mysys/md5.c +++ b/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