ethumb: Memset whole contex in md5 implementation

I don't know what they tried here but if we consider the content
of ctx sensitive we should memset the whole thing.

CID 222382
This commit is contained in:
Stefan Schmidt 2014-05-16 14:32:51 +02:00
parent 2389d7f8ee
commit 3d269acefa
1 changed files with 1 additions and 1 deletions

View File

@ -147,7 +147,7 @@ void MD5Final(unsigned char digest[16], MD5_CTX *ctx)
MD5Transform(ctx->buf, ctx->in.i);
byteReverse((unsigned char *) ctx->buf, 4);
memcpy(digest, ctx->buf, 16);
memset((char *) ctx, 0, sizeof(ctx)); /* In case it's sensitive */
memset(ctx, 0, sizeof(MD5_CTX)); /* In case it's sensitive */
}
/* The four core functions - F1 is optimized somewhat */